I have programmatically set up a UITabBarController
with 3 views, but the icons in the UITabBar
aren't looking like what I wanted them to. Is there a way to programmatically resize/move them?
Asked
Active
Viewed 1,074 times
0

Fabio
- 3,015
- 2
- 29
- 49
1 Answers
1
The icons in the UITabBar
are instances UITabBarItem
which is a subclass of UIBarItem
.
UIBarItem
has a property called imageInsets
which I think is exactly what you are looking for.
I imagine the code will look something like:
UIEdgeInsets insets = {
.top = 3,
.left = 0,
.bottom = 4,
.right = 3
};
self.tabBarItem.imageInsets = insets;
You could also just try modifying the raw image file so it sits better in the space.

Awais Hussain
- 98
- 1
- 2
- 8
-
tyvm my friend :)) sorry it took me so long to mark it as the correct answer – Fabio Aug 06 '13 at 11:26