如何使UIBarButtonItem的文本换行为两行? [英] How can I make the text of a UIBarButtonItem wrap to two lines?

查看:79
本文介绍了如何使UIBarButtonItem的文本换行为两行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的UINavigationController中的一些视图控制器标题很长,这使得层次结构中下一个视图控制器的导航栏中的后退按钮会漏掉一些文本,而用"..."代替.

Some of the titles of view controllers in my UINavigationController are quite long, which makes the back button in the navigation bar of the next view controller in the hierarchy miss out some of the text, with a "..." instead.

如何像iPod.app导航栏中的正在播放"一样,使后退按钮的文本换成两行?

How could I make the text of the back button wrap onto two lines, as with "Now Playing" in the navigation bar of iPod.app?

谢谢!

推荐答案

您可以使用UIBarButtonItem方法initWithCustomView:然后在UINavigatiobItem中设置rightBarButtonItem属性.

You could use the UIBarButtonItem method initWithCustomView: then set the rightBarButtonItem property in UINavigatiobItem.

这篇关于如何使UIBarButtonItem的文本换行为两行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆