标签:ios view uiviewcontroller uinavgationcontrolle 层次结构
在开发的时候,有时候会遇到
1.ios attempt to present whose view is not in the window hierarchy
2.Warning: Attempt to present on whose view is not in the window hierarchy!
等等这样类似的提示,只要里面提示有
上面的问题都是在一个controller的view还没加到window上的时候又取present另外一个controller,这就相当于在盖楼,2楼还没盖完,直接去盖3楼了,这样肯定是不行。
遇到上面的问题 最直接的解决方法就是在controller的viewDidAppear里面去调用present。这样可以确保view
Attempt to present on whose view is not in the window hierarchy!
标签:ios view uiviewcontroller uinavgationcontrolle 层次结构
原文地址:http://blog.csdn.net/july_sal/article/details/42104133