“隐藏”推送视图时的选项卡栏
纽约时报 iPhone 应用程序有一个带有五个选项卡栏项目的选项卡栏。当您选择“最新”选项卡时,应用程序会在 UITableView 中显示标题和摘要/摘要。当您选择要阅读的单个故事时,选项卡栏会消失,并替换为页眉和页脚,页眉和页脚的显示/消失取决于应用程序的状态。应用程序如何“隐藏”标签栏?
谢谢!
The New York Times iPhone application has a Tab Bar with five tab bar items. When you select the Latest tab, the app shows the title and abstract/summary in a UITableView. When you select an individual story to read, the Tab Bar disappears and is replaced with a header and footer that appears/disappears depending on the state of the app. How does the app "hide" the tab bar?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在要隐藏选项卡栏的类中实现这段代码。
一切顺利。
Implement this piece of code in the class where you want to hide the Tab Bar.
All the best.
被推送到导航控制器堆栈上的视图控制器的 hidesBottomBarWhenPushed 参数设置为 yes。代码在表视图的 -didSelectRowAtIndexPath 中看起来像这样。
看看 hidesBottomBarWhenPushed 的文档。
ps 如果您向此问题添加标签“iphone”,您可能会更清楚地了解该问题。
The view controller that is being pushed onto the navigation controller stack has its hidesBottomBarWhenPushed parameter set to yes. The code would look something like this in the table view's -didSelectRowAtIndexPath.
Take a look at the documentation for hidesBottomBarWhenPushed.
p.s. You'll probably get more visibility on this question if you add the tag 'iphone' to it.
我有一个视图需要选择(取决于其他状态)显示导航控制器工具栏。这是我用来展示和展示的解决方案当视图出现时隐藏工具栏(带动画)通过导航消失。听起来像是您可能想要的。
I have a view that needs to optionally (depending on some other state) show the navigation controller toolbar. This is the solution I used to show & hide the toolbar (with animation) when the view appears & disappears via navigation. It sounds like what you might be after.