怎么实现首页隐藏的 UINavigationBar 导航条
来源:互联网 发布:linux为锁添加计数值 编辑:程序博客网 时间:2024/04/30 06:32
How to hide/disable only the first uinavigationbar?
In most of my applications I have a custom UIViewController class that I derive all other custom controllers from. In some of these, I added a method like `navigationBarInitiallyHidden` to the base class that other classes can override. The default result depends on the nature of the application.
In the delegate of the navigation controller, when a controller is being shown that implements that method, the delegate hides or shows the navigation controller accordingly. Since I animate the hide or show, I check the current state and do nothing if no change is needed.
You could do something simpler in your delegate method. If the controller being shown is the root controller, hide the navigation bar, otherwise show it if it is hidden.
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
if ( viewController == rootController ) {
[navigationController setNavigationBarHidden:YES animated:animated];
} else if ( [navigationController isNavigationBarHidden] ) {
[navigationController setNavigationBarHidden:NO animated:animated];
}
}
- 怎么实现首页隐藏的 UINavigationBar 导航条
- 导航条的使用 UINavigationBar
- iOSiOS UINavigationBar跳转页面的导航条隐藏或者出现空挡不完整
- UINavigationBar 【导航条】自己的见解
- iOS导航条底部与self.view的分界线怎么隐藏 ,取消导航下边的线
- iOS隐藏导航栏底部的线条& UINavigationBar小技巧
- iOS隐藏导航栏底部的线条& UINavigationBar小技巧
- iOS 6 禁用取消去掉UINavigationBar导航条的阴影
- 导航条UINavigationBar和工具栏tabBar的灰色高亮线去掉
- iOS导航条底部 与self.view 的分界线怎么隐藏
- iOS 隐藏导航栏UINavigationBar底部黑线
- iOS 隐藏导航栏UINavigationBar黑线
- iOS基础控件-导航栏控制器UINavigationController的UINavigationBar导航条
- ios5 自定义导航条问题 UINavigationBar
- ios5 自定义导航条问题 UINavigationBar
- ios5 自定义导航条问题 UINavigationBar
- 左侧自动隐藏的导航条
- iphone导航条的显示与隐藏
- textarea中的回车换行
- 海量数据处理面试题集锦与Bit-map详解
- dom4j 使用简介
- 读样章、写评语,即有机会获赠《编程大师访谈录》!
- 原来都支持64位
- 怎么实现首页隐藏的 UINavigationBar 导航条
- php中的数据类型
- 多线程条件下的计数器
- linux2次锁互斥变量死锁的例子
- Android Camera Subsystem 架构(Binder机制)及显示分析(2)
- 对块设备读写时发生了什么?
- 取消共享
- tsm 恢复某特定的时间,文件
- linuxwireless 资料