星空网 > 软件开发 > 操作系统

Presenting view controllers on detached view controllers is discouraged CallViewController: 0x14676e240.

 今天在优化app时,发现程序出现这种警告:“

Presenting view controllers on detached view controllers is discouraged <CallViewController: 0x14676e240>.

首先说明一下,我是在判断无网络时,要弹出一个提示框时出现的这个问题

Presenting view controllers on detached view controllers is discouraged CallViewController: 0x14676e240.images/loading.gif' data-original="http://images2015.cnblogs.com/blog/831219/201606/831219-20160629142458359-1471146110.png" />

在网上查资料时,又说是当前控制器已present一个视图,再present一个视图时,就会出现这个错误。但是在我的项目中当前页面根本就没有第二个present了,因此也就不存在present多个视图了。通过摸索,我是这样解决问题的:

Presenting view controllers on detached view controllers is discouraged CallViewController: 0x14676e240.

将present操作放在线程中执行就OK了。

 

不过,,问题虽然解决了,但是我却并不知道这是什么原因导致的,按理说不将present操作放在线程中也对啊,因为之前是没有present操作的,我很是纠结,希望有解决此问题、并看到我此次小结的大神知道一番!

 




原标题:Presenting view controllers on detached view controllers is discouraged CallViewController: 0x14676e240.

关键词:ie

ie
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流