您的位置:首页 > 移动开发

线程:This application is modifying the autolayout engin from a background thread

2016-04-18 13:29 525 查看
http://blog.csdn.net/fuzongjian/article/details/50621676

昨天处理相册问题是,遇到这样的问题:

[objc] view
plain copy







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

看看下面的截图也许就能明白点儿什么



我自己的是这样的写的:(大致意思是我避开了主线开辟了一个线程去相册读取数据,拿到数据后我直接去更新数据,而不是代码回到主线程中去更新数据)





搞明白错误在哪,修改八阿哥手到擒来:



所以说,从别的线程中拿到数据源后,必须回到主线程中更新数据和UI。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: