UINavigation加载模态视图跳转后设置导航
来源:互联网 发布:51testing软件培训 编辑:程序博客网 时间:2024/06/09 22:43
在开发过程中,加载模态视图后,模态视图会遮住导航控制器,为了实现保持或者自定义导航栏
代码如下:
#pragma mark - AddConment- (void)AddConment{ ConmentViewController *add = [[ConmentViewController alloc] init]; UINavigationController *secondNav = [[UINavigationController alloc] initWithRootViewController:add]; [self presentViewController:secondNav animated:YES completion:nil];}意思就是说,在加载模态视图的时候创建一个UINavigation 然后让模态视图做为它的根视图即可。
这里值得注意的是:要有一个硬件判断,防止导航栏遮挡住模态视图中的内容。【ios7】
代码如下:
//判断硬件系统是否是ios7以上,<span style="color: rgb(51, 102, 255); font-family: 'Hiragino Sans GB W3', 'Hiragino Sans GB', Arial, Helvetica, simsun, u5b8bu4f53;font-size:14px; line-height: 28px;">防止导航栏遮挡住模态视图中的内容</span> if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) { self.edgesForExtendedLayout = UIRectEdgeNone; self.extendedLayoutIncludesOpaqueBars = NO; self.modalPresentationCapturesStatusBarAppearance = NO; }
0 0
- UINavigation加载模态视图跳转后设置导航
- iOS 视图切换(UITabBarController,UINavigation,Controller模态窗口)
- iOS 设置导航栏半透明后添加视图变化
- IOS导航栏UINavigation
- UINavigation 导航控制器
- UINavigation导航栏颜色
- UI导航栏(UINavigation)相关属性left\rightButton,导航栏title,系统时间颜色的设置
- 打开模态视图 导航
- 模态视图跳转到根视图
- UINavigation导航控制器的使用
- ios 开发--使用模态跳转了2次之后怎么从第三个视图控制器回到跟视图控制器
- 解决导航跳转和模态跳转混合问题
- ViewController跳转后导航栏会发黑
- UINavigation.title相关属性设置
- 状态栏(UITabBar)、导航栏(UINavigation)
- IOS Swift3.0自定义导航栏(UINavigation)
- IOS 模态视图跳转界面
- iOS8 模态视图跳转动画
- Android UI开源项目
- Object-c:@property 参数说明 (property parameter)
- 现在开始自己学习了加油啦
- wamp修改php.ini重启wamp后不生效的解决方法
- cassandra 命令行操作
- UINavigation加载模态视图跳转后设置导航
- Windows7 点击桌面图标和点击鼠标右键没反应
- [JAVA][2013蓝桥杯预赛 JAVA本科B组][振兴中华]
- HTTP协议详解(真的很经典)
- java中的Iterator和Iterable 区别
- openwrt 折腾日志(2)
- linux打开和关闭端口
- javascript之sort排序的问题
- 用VMware克隆CentOS 6.4后网卡不能使用处理方法