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?
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)]
You probably want to apply this offset globally, so I'd suggest
Obj-C
[UITabBarItem appearance].titlePositionAdjustment = UIOffsetMake(0, -4);
Swift:
UITabBarItem.appearance().titlePositionAdjustment = UIOffset(horizontal: 0, vertical: -4)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With