Application tried to present modally an active controller
2017-04-01 17:17
330 查看
控制器模态到另一个控制器发生了错误。报错是Application 试图模态到一个活跃的控制器中。
第一次模态的时候不会出现问题,第二次发生了问题。
也就是说明了第二次模态的视图是活跃状态,没有销毁。
查找代码,发现了问题,第一次模态之后,控制器不是通过dismiss回到之前的控制器,而是通过其他的方式。
这时候就需要我们在第一次模态之后,跳到之前页面的时候,把当前视图控制器销毁,置nil。
然后我们再模态到这个视图就没有问题了。
第一次模态的时候不会出现问题,第二次发生了问题。
也就是说明了第二次模态的视图是活跃状态,没有销毁。
查找代码,发现了问题,第一次模态之后,控制器不是通过dismiss回到之前的控制器,而是通过其他的方式。
这时候就需要我们在第一次模态之后,跳到之前页面的时候,把当前视图控制器销毁,置nil。
然后我们再模态到这个视图就没有问题了。
相关文章推荐
- 关于模态窗口错误 Application tried to present modally an active controller
- 模态出来报错:Application tried to present modally an active controller
- Application tried to present modally an active controller
- 模态窗口错误 Application tried to present modally an active controller
- 【问题处理】Application tried to present modally an active controller
- Application tried to present modal view controller on itself
- Application tried to present a nil modal view controller on target “Current View Controller”解决方案
- Application tried to push a nil view controller on target <UINavigationControlle
- Application tried to push a nil view controller on target
- How to load a dll resource dialog box at an application Dialog box (怎么在一个应用程序对话框动态加载DLL里的资源对话框)
- This application has requested the Runtime to terminate it in an unusual way
- 正确使用模态 Present ViewController Modally
- [转]application windows are expected to have a root view controller错误
- unable to start debugging on the web server iis does not list an application that matches the launched url
- Java SE series:1. environment configure and Hello world! [We use compiler and packager to create an application!]
- 'Application windows are expected to have a root view controller at the end of application launch'
- Application windows are expected to have a root view controller at the end of application launch
- An iterative image registration technique with an application to stereo vision笔记
- Unable to add window token null is not for an application
- application windows are expected to have a root view controller错误