I'm programmatically generating a UITabBarController (instantiating view controllers and assigning them to my UITabBarController's viewControllers array). I don't want titles for my TabBarItems. However, the TabBarItems by default make space for a title, so my icon images are centered 5 pixels higher than they should be. Is there a programmatic way to "center" i.e. shift or give offsets to the TabBarItem's image?
Asked
Active
Viewed 1,630 times
2 Answers
3
You can use the imageInsets property to move the frame of the icon.

LordErkin
- 31
- 2
-
It is not a critique or a request for clarification. It is a statement on how to achieve what the OP wanted to do, i.e. an answer. – LordErkin Mar 27 '15 at 12:12
-2
Unfortunately, there isn't a way to do this (and even if you managed to cheat and find a way to shift this stuff down it would no doubt be denied by Apple during the approval process).

Kenny Wyland
- 20,844
- 26
- 117
- 229