How can I make the text of a UIBarButtonItem wrap to two lines?

为君一笑 提交于 2020-01-03 00:52:28

问题


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.

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?

Thanks!


回答1:


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



来源:https://stackoverflow.com/questions/2614098/how-can-i-make-the-text-of-a-uibarbuttonitem-wrap-to-two-lines

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!