Xcode7编译崩溃,报错如下——解决办法

来源:互联网 发布:数据调研公司排名 编辑:程序博客网 时间:2024/06/10 18:44

报错原因:

This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release.

翻译

此应用程序从一个后台线程修改自动布局引擎,这可能导致引擎腐败和奇怪的崩溃。这将导致将来的版本的一个例外。

相对应的代码块:

[popupController presentPopupControllerAnimated:YES];

解决办法

使用下面GCD代码即可(使用主线程更新UI)

dispatch_async(dispatch_get_main_queue(), ^{   [popupController presentPopupControllerAnimated:YES];     // 更UI });

从新编译,运行即可~!

0 0
原创粉丝点击