如何使 UIBarButtonItem 的文本换行为两行?

发布于 2024-08-28 18:09:02 字数 157 浏览 1 评论 0原文

我的 UINavigationController 中的某些视图控制器的标题相当长,这使得层次结构中下一个视图控制器的导航栏中的后退按钮错过了一些文本,而是用“...”代替。

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

谢谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无悔心 2024-09-04 18:09:03

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文