How I made Crescent Moon Tabbar In Swift

Crescent Moon

This is a code that was ued to make a custome tabbar for a project I was working on.

Here is the picture of the tabbar in real app. I am opening a Qr reader from this button. This is a referenced in code as image #1.

MainViewController is the subclass of UITabBarViewController. All the viewcontroller are added pragmatically. StoryBoard is practically unused except for this curve part.

class MainViewController: UITabBarController {

}

MainViewController is just a UITabBarContrller

I needed reference to the UITabbar. Since CustomizedTabBar is subclass of UITabbar. I dragged a UItabbar inside the storyboard and gave it the class of CustomizedTabBar.

Add a UITabbar to the storyboard and give it class CustomizedTabBar

If you run Into problem, 3d Debugging tool for view is great. It will give a 3d exploaded view.