whose view is not in the window hierarchy!
来源:互联网 发布:windows 10 14393 编辑:程序博客网 时间:2024/05/21 04:02
2015年3月25日:遇到问题whose view is not in the window hierarchy!
案例再现:在a控制器中取得当前地图定位位置进行判断,如果与正在显示的位置不同则present一个alertview。由于网络问题,判断还没开始,用户点击了a控制器进行跳转,此时显示为栈顶为b控制器。迟来的判断终于到来,问题也随之出现。
原因分析:alertview 显示时 a控制器已经不是栈顶控制器,b控制器才是。
解决方案:在alert的时候判断当前显示的是否是a控制器;(可不可行还没实现,有遇到的朋友可以提供实例)
stackoverflow上有另一的一个案例,http://stackoverflow.com/questions/11862883/whose-view-is-not-in-the-window-hierarchy/;其原因在例子中有进行解释:大致是因为在viewdidload中present了另外一个控制器,此时由于view还没显示,于是出了问题。解决方案是在viewdidappear中实现present;
0 0
- 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!
- window模态导航控制器出现的问题 "whose view is not in the window hierarchy!"
- 对Warning: Attempt to present on whose view is not in the window hierarchy!的解决方案
- Warning: Attempt to present A on B whose view is not in the window hierarchy!
- 对Warning: Attempt to present on whose view is not in the window hierarchy!的解决方案
- 对Warning: Attempt to present on whose view is not in the window hierarchy!的解决方案
- Warning: Attempt to present * on * whose view is not in the window hierarchy!
- Warning: Attempt to present xx on yy whose view is not in the window hierarchy!
- Warning: Attempt to present A on B whose view is not in the window hierarchy!
- Attempt to present on whose view is not in the window hierarchy!
- ios开发异常:whose view is not in the window hierarchy! (20
- myeclipse优化
- ios foundation框架简介
- java 执行 cmd 命令
- GetContent
- PHP命名空间(Namespace)的使用详解
- whose view is not in the window hierarchy!
- 4个分区思想 3
- SOCKET
- [Leetcode] 76. Minimum Window Substring
- 高手速成android开源项目【View篇】
- 时间去哪儿了
- 交换排序-快速排序
- 寻找第K大的数
- oracle恢复误删除表