当视图位于栏上时为 UITabBar 设置单独的标题与更多...?
在线程“有没有办法为 UITabBar 设置单独的短标题?”提出这个问题(已编辑):“如何为视图提供短名称以显示在选项卡栏上,以及在链接同一视图时提供更长(更具描述性)的名称到表视图(有更多空间)。”答案是为导航控制器和 tabBar 控制器提供单独的标题。我认为这并不能完全回答问题。有两个地方可以看到tabBar标题:在选项卡栏本身和“更多...”屏幕上,这是一个tableView。
当在选项卡栏上可见时,标题需要较短,但在“更多”视图上时,标题需要较长。达到这个目的有什么技巧呢?
In the thread "Is there a way to set a separate short title for UITabBar?" this question is asked (edited): "How do I give views short names for display on the tab bar, and longer (more descriptive) names when the same view is linked to in a table view (which has more space)." The answers were to give separate titles to the navigation controller and the tabBar controllers. I don't think that completely answers the question. There are two places the tabBar title is seen: on the tab bar itself and on the "More..." screen which is a tableView.
When visible on the tab bar the title needs to be short, but when on the More view the title needs to be longer. What's the trick to accomplish that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
回答我自己的问题:在 UITabBarController delgate 中使用暴力:
Answering my own question: use brute force in the UITabBarController delgate: