UITabBarItem title position UITabBarItem title position objective-c objective-c

UITabBarItem title position


If you want to move up simply set vertical offset to negative value

UITabBarItem* it = [[self.tabController.tabBar items] objectAtIndex:0];it.titlePositionAdjustment = UIOffsetMake(0.0, -2.0);

You don't have to use proxy as it is done here UITabBarItem title in centre of title, not at bottom.You can define offset per item.


Swift version for the lazy ones :)

UITabBarItem.appearance().titlePositionAdjustment = UIOffsetMake(0.0, -4.0)


If you want to update all of them:

tabBar.items?.forEach({ $0.titlePositionAdjustment = UIOffset(horizontal: 0.0, vertical: -2.0) })