presentViewController显示方式的窗口,没有导航栏的解决方法
2016-10-17 19:50
633 查看
ViewController *Controller = [[ViewController alloc] init];
[self presentViewController:Controller animated:YES completion:nil];
怎么看怎么觉得代码没啥问题,搜索了半天发现应该采用如下方式,对Controller进行转换
ViewController *Controller = [[ViewController alloc] init];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:Controller];
[self presentViewController:nav animated:YES completion:nil];
这样就OK啦
[self presentViewController:Controller animated:YES completion:nil];
怎么看怎么觉得代码没啥问题,搜索了半天发现应该采用如下方式,对Controller进行转换
ViewController *Controller = [[ViewController alloc] init];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:Controller];
[self presentViewController:nav animated:YES completion:nil];
这样就OK啦
相关文章推荐
- presentViewController显示方式的窗口,没有导航栏的解决方法
- IOS-44-解决用模态方式presentViewController推出页面时导航栏消失问题
- 判断当前viewcontroller是push还是present的方式显示的
- 关于使用模态窗口presentViewController跳转黑屏的解决
- 以popup方式呈现的viewcontroller中键盘消失的解决方法
- ios开发 判断当前ViewController是push还是present的方式显示的
- 判断当前viewcontroller是push还是present的方式显示的
- iOS 判断当前viewcontroller是push还是present的方式显示
- iOS开发手记 - iOS9.3 UINavigationController添加后不显示storyboard中viewcontroller里的控件的解决方法
- 判断当前viewcontroller是push还是present的方式显示的
- 判断当前viewcontroller是push还是present的方式显示的
- 找不到显示桌面的快捷方式怎么办|显示桌面的快捷方式找不到解决方法|显示桌面代码|
- 无焦点显示窗口解决方法
- 快速启动项中没有显示桌面图标解决方法
- Extjs TriggerField在弹出窗口显示不出问题的解决方法
- ifconfig 中没有显示IP的解决方法
- Crystal Report XI 图片没有办法显示解决方法
- IE8按F12不显示开发人员工具窗口的解决方法
- 【共享】解决“无法显示进程。没有正确安装调试器。请运行安装程序安装或修复调试器。”错误的方法。
- ClassView不显示类的信息de 解决方法