您的位置:首页 > 其它

Attempt to present <TestViewController2: 0x7fd7f8d10f30> on <ViewController: 0x7fd7f8c054c0> whose view is not in the window hierarchy!

2018-06-15 00:15 561 查看

当 storyboard里面的 按钮 即连接了 类文件里面的点击方法  又  连接了   storyboard里 另一个  控制器的  modal 

就会出现类似Attempt to present <TestViewController2: 0x7fd7f8d10f30> on <ViewController: 0x7fd7f8c054c0> whose view is not in the window hierarchy!的错误  ,意思是说系统尝试present一个没有在window的层级结构内 存在view的控制器

需要去掉一个方法,不要对一个按钮通过不同形式重复add不同的方法。这样会冲突。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐