ios: push viewcontroller 时出现Presenting view controllers on detached view controllers is discouraged
来源:互联网 发布:js上传图片本地预览 编辑:程序博客网 时间:2024/05/16 17:05
原因
a,b,c 三个viewcontroller,a作为根视图,b.view 添加到a上,在b中模态(presentViewController)弹出c.
这种情况就会出现标题的警告
解决方法:
//如下[self.view.window.rootViewControllerpresentViewController:controller animated:YEScompletion:nil];
/*这里一段解释
The reason of this warning is i was presenting a view controller over a small view that is not full size view. Given below is the image of my project. where on click on four option above. User navigate to different childviewcontroller's view.(it works like tabViewcontroller). But the childviewcontroller contains view of small size. So if we present a view from childviewcontroller it gives this warning.*/
本人也觉得这是个治标不治本的方法,这个方法表面上好像解决了问题,实际可能在特殊情况下引发更严重的bug
- 2.正确使用viewcontroller,此问题是误用viewcontroller引起的
0 0
- ios: push viewcontroller 时出现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
- 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 我碰到这类问题的解决方法
- 解决Presenting view controllers on detached view controllers is discouraged <PersonInfoViewControlle警告
- Presenting view controllers on detached view controllers is discouraged的解决方案
- 遇到的一个Presenting view controllers on detached view controllers is discouraged问题
- 抛出异常与栈展开(stack unwinding)
- JAVA IO与NIO优劣浅析
- MySQL分页性能优化
- gis api for js 框选区域取面积 以及 取重叠区域面积
- abap 弹出对话框函数POPUP_GET_VALUES的使用方法
- ios: push viewcontroller 时出现Presenting view controllers on detached view controllers is discouraged
- echarts 饼图 labelLine
- fcntl.h与unistd.h头文件
- 关于android的res里面的各个drawable文件夹
- 【全栈开发】构建一个请求模拟系统
- python解压rar文件
- 一个程序员的自白
- vs配置opencv
- -Dmaven.multiModuleProjectDirectory system propery is not set