Search code examples
iosobjective-cxcode4.5uitabbaruitabbaritem

Is there a way to change the text position in UITabBar or UITabBarItem?


enter image description here

This is a custom tab bar I intended to put up on the screen. However, my partner want the text to be slightly up. How can I do so?


Solution

  • Why don't you just have an empty title property for your view controller and add the title to your custom images for the tab?

    UPDATE: For the sake of completeness of answer; from comments and ios tabbar put text in the middle when no image

    [tab.tabBarItem setTitlePositionAdjustment:UIOffsetMake(0, -10)]