美文网首页
whose view is not in the window

whose view is not in the window

作者: saintPN | 来源:发表于2016-03-15 11:14 被阅读0次

  写代码的时候在viewdidload里面做了个判断,如果判断为否,则弹出一个alert,可是莫名其妙地出现一个警告,警告如下。

  后来做了一些测试,找出了原因,是因为在viewdidload里面再显示任何view的话都会有这个警告,个人理解viewdidload阶段尚处于读取阶段,不能修改ui显示view,解决方法在视图周期其他的方法里调用,如viewwillappear就没问题了

相关文章

网友评论

      本文标题:whose view is not in the window

      本文链接:https://www.haomeiwen.com/subject/aotqlttx.html