Presenting view controllers on detached view controllers is discouraged
来源:互联网 发布:java 读取zip包中文件 编辑:程序博客网 时间:2024/05/16 21:38
代码present一个viewController时,出现该警告,并造成代码执行出现问题。
present的代码如下:
if ([[[UIDevice currentDevice] systemVersion] floatValue] < 6.0) { [self presentModalViewController:picker animated:NO]; }else{ [self presentViewController:picker animated:NO completion:nil]; }
代码在iOS及以上运行,按理应该不会出错。
根据搜索结果,得出解决方法,将以上代码改成如下即可:
if ([[[UIDevice currentDevice] systemVersion] floatValue] < 6.0) { [self.view.window.rootViewController presentModalViewController:picker animated:NO]; }else{ [self.view.window.rootViewController presentViewController:picker animated:NO completion:nil]; }
项目仓促,有时间再来研究下原因吧。
0 0
- Presenting view controllers on detached view controllers is discouraged
- Presenting view controllers on detached view controllers is discouraged
- Presenting view controllers on detached view controllers is discouraged
- Presenting view controllers on detached view controllers is discouraged
- Presenting view controllers on detached view controllers is discouraged
- Presenting view controllers on detached view controllers is discouraged
- Presenting view controllers on detached view controllers is discouraged
- Presenting view controllers on detached view controllers is discouraged
- Presenting view controllers on detached view controllers is discouraged
- Presenting view controllers on detached view controllers is discouraged 我碰到这类问题的解决方法
- iOS错误之-Presenting view controllers on detached view controllers is discouraged
- iOS:编译问题Presenting view controllers on detached view controllers is discouraged
- 解决Presenting view controllers on detached view controllers is discouraged <PersonInfoViewControlle警告
- iOS 关于Presenting view controllers on detached view controllers is discouraged的警告
- Presenting view controllers on detached view controllers is discouraged的解决方案
- 遇到的一个Presenting view controllers on detached view controllers is discouraged问题
- 解决警告Presenting view controllers on detached view controllers is discouraged 以及引申
- ios: push viewcontroller 时出现Presenting view controllers on detached view controllers is discouraged
- Java垃圾回收:GC在什么时候对什么做了什么
- MLP、RBF、SVM网络比较及其应用前景
- js日期比较
- 树的存储和构建
- oracle服务器和客户端字符集的查看和修改
- Presenting view controllers on detached view controllers is discouraged
- 搭建Eclipse 同时开发android和j2ee开发环境
- kendo ui开源工具:Kendo ui core
- 编译android4.4系统步骤简版
- Fragment学习之ListFragment的使用
- MySQL 性能优化
- Apache+tomcat的整合
- xcelAndJSON的设计决策
- eclipse生成jar包