How to build a round TabBar in Swift

Emmanuele Corporente
1 min readMar 20, 2020

--

Hi reader, I’m explaining you in a very quicking way how to customize a native standard TabBar into something with round corners and with a futuristic aspect.

First of all let’s start to create a new Swift file, name it as you prefer, for me it will be RoundedTabBarController, a subclass of UITabBarController.

What we need to do now is to declare a CAShapeLayer() and to customize the shape and shadow, let’s doing that in the viewDidLoad() method:

Good, now last 2 things, first we need to compact and resize the space between all the items:

Second don’t forget to type if you are using storyboard, the class name in the Identity inspector.

That’s all folks!

--

--