问题:
在主线程之外的线程更改界面,会报错: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.
解决方法:
把更改界面的语句写在这里面:
dispatch_async(dispatch_get_main_queue(), {
// code here
})
时间: 2024-10-17 19:35:18