Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am having a problem with my icons in my tabBar.

Tapping the same tab bar button repeatedly will keep increasing the tab bar icon's size.
If I push a different one, it goes back to its original size.

enter image description hereenter image description here

Any ideas what I should fix?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
444 views
Welcome To Ask or Share your Answers For Others

1 Answer

As per the project shared by the OP (see question comments), it seems the tab bar image insets seem to be messing things up.


Steps to resolve the issue:

  1. Select the tab bar item of the problematic ViewControllers in IB
  2. Go to Size Inspector section (on the right)
  3. Ensure your image insets are balanced
    • If you give 5px inset to top then balance with a -5px inset to bottom
    • If you give 5px inset to left then balance with a -5px inset to right

I have no explanation for this, sorry... but if anyone does then kindly comment/post


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...