SwiftStarter SwiftStarter - 10 months ago 87
Swift Question

tabBar buttons are overlapping. How can I space them out better?

I'm having an issue with a children's app I'm making.
My tab bar items are not being spaced out properly and I'm not sure how to go about fixing it.

Here's a pic of how it looks:
enter image description here

If someone could give me a little direction on how I can stope my items from overlapping and space them out evenly across the screen, it would be a huge help.

Thanks :)


Sorry guys.

I found the answer after a little bit of digging. You just need to add this in a your custom tab View Controller:

override func viewWillLayoutSubviews() {

    tabBar.itemPositioning = UITabBarItemPositioning.fill