Search code examples
xcodeswiftuitabbaritem

UITabBarItem grows when touched


I have a tab view controller with 3 tabs, custom icons. I used insets to enlarge them slightly and compensate for the lack of titles. All of this is done in the story board, the only code for these items is setting the text to "" since it always wanted to pick up the View title no matter what I set in the story board.

It look like this: enter image description here

now, if I repeatedly tap a tab bar item, this happens: enter image description here

It happens to all three, and it will keep growing if you keep tapping. I'm not setting the size, these are image sets and all I did was change the insets in IB

Any idea what's happening here? (Xcode 6.4 iOS 8.4.1)


Solution

  • I finally found an similar question here : iOS Tab Bar icons keep getting larger

    it seems that any inset that makes the image larger will be applied every time you touch it. It doesn't really make sense but if I use insets to only center the image and not enlarge it the issue goes away