Search code examples
iphonecocoa-touchuitabbaruitabbaritem

Customizing icon position and title of UITabBarItem's (iphone sdk)


I have a tabBar, and I want to customise the items in the tab bar. I want to prevent the display of the title (easily achieved by setting the title to nil), and reset the icon position to be in the central vertical position. Does anyone have any idea of how this can be done?

Thanks.


Solution

  • You can try to use UIToolBar instead of UITabBar. UIBarButtonItem has method initWithCustomView. This is more complicated but may work properly.