如何自定义 UITabBarItem 上的标题?
使用initWithTabBarSystemItem
方法创建UITabBar对象时有没有办法设置标题?我后来尝试设置标题属性(在 viewController
和选项卡栏项目上),但似乎没有什么区别。我了解 initWithTitle: image:
方法,但我想使用带有自定义标题的系统图标之一。
When using the method initWithTabBarSystemItem
to create a UITabBar object is there a way to set the title? I've tried setting the title property (on the viewController
and tab bar item) afterwards but it doesn't seem to make a difference. I know about the initWithTitle: image:
method but I want to use one of the system icons with a custom title.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您使用的是系统项目,则无法自定义它,您将必须制作一个自定义项目,并使用相同或相似的艺术品...您可以从以下位置获取艺术品:http://www.teehanlax.com/blog/iphone-gui-psd/
If yo are using the systemItem you can't customize it, you will have to make a custom Item, and use the same or similar artwork... you could get the artwork from: http://www.teehanlax.com/blog/iphone-gui-psd/
您可以通过两种方式做到这一点。
或
转到界面生成器;单击 UITabBarItem 并对其进行编辑。
You can do it in two ways.
or
Go to the interface builder ; Click on the UITabBarItem and edit it.