ios开发异常:whose view is not in the window hierarchy! (20
来源:互联网 发布:最便宜的域名虚拟机 编辑:程序博客网 时间:2024/05/22 18:00
问题描述:
在storyboard中,由controller A跳转到controllerB的时候然后报Warning: Attempt to present on whose view is not in thewindow hierarchy!
问题参考:
http://stackoverflow.com/questions/11862883/whose-view-is-not-in-the-window-hierarchy
问题分析:
My presumption is that the view controller'sview isnot inthe window hierarchy at the point that it has been loaded (whenthe messageis sent), but it is inthe window hierarchy after it has been presented (whenthe messageis sent).
viewDidLoad
viewDidAppear:
补上中文分析:
结合自己的思考以及半通不通的英文水平,大致分析一下,应该是这么回事情,在controllera的viewDidLoad里面直接跳转controllerb,然后导致在显示controller b的时候也调用了controllera来显示,然后发现这个window的层次结构就错乱了。
问题解决:
在controllera中跳转的时候,要在viewDidLoad以及viewDidAppear之后才能跳转,所以可以自己想办法延时跳转,而不是直接跳转,延时的话,方法就很多了,可以用nstimer各种等等。
0 0
- ios开发异常:whose view is not in the window hierarchy! (20
- iOS开发异常warning:***whose view is not in the window hierarchy!
- [ios开发异常]whose view is not in the window hierarchy!
- iOS开发出错whose view is not in the window hierarchy!的解决
- IOS 开发中 Whose view is not in the window hierarchy 错误的解决办法
- [IOS开发记录]Whose view is not in the window hierarchy 错误的解决办法
- IOS 开发中 Whose view is not in the window hierarchy 错误的解决办法
- iOS 开发中 Whose view is not in the window hierarchy 错误的解决办法
- IOS 开发中 Whose view is not in the window hierarchy 错误的解决办法
- whose view is not in the window hierarchy!
- whose view is not in the window hierarchy!
- whose view is not in the window hierarchy
- whose view is not in the window hierarchy
- whose view is not in the window hierarchy
- whose view is not in the window hierarchy
- whose view is not in the window hierarchy!
- whose view is not in the window hierarchy!
- iOS后台保持(whose view is not in the window hierarchy)
- 项目使用的gulpfile.js
- SQL查询数据库表名、表的列名
- 【Android】导入第三方jar包Could not find class 异常解决
- linux下配置Tilera MDE4.1.8方法
- [leetcode] Add Binary
- ios开发异常:whose view is not in the window hierarchy! (20
- 主板报错的信息。
- 轻松理解三范式
- Androind中操作文件
- alias、grep、wc、find、xargs
- OSX中使用xdebug调试遇到的问题
- php extensions
- 【转】STM32的IAP方案
- 电力设备SF6