有没有办法在UITabBar或UITabBarItem中更改文本位置? [英] Is there a way to change the text position in UITabBar or UITabBarItem?
本文介绍了有没有办法在UITabBar或UITabBarItem中更改文本位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我打算在屏幕上显示一个自定义标签栏。但是,我的合作伙伴希望文字略微提升。我怎么能这样做?
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?
更新:为了完整答案;来自评论和 ios tabbar将文本放在中间时没有图片
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)]
这篇关于有没有办法在UITabBar或UITabBarItem中更改文本位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文