warning:This application is modifying the autolayout engine from a background thread
生活随笔
收集整理的這篇文章主要介紹了
warning:This application is modifying the autolayout engine from a background thread
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
警告提示: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.
錯誤原因:在回調(diào)函數(shù)中或者后臺線程中更新了UI界面,而UI界面必須是在主界面中才能進(jìn)行修改
解決辦法:
dispatch_async(dispatch_get_main_queue(), ^{
? ? ? <your code>
});
轉(zhuǎn)載于:https://www.cnblogs.com/peaceWang/p/5098164.html
總結(jié)
以上是生活随笔為你收集整理的warning:This application is modifying the autolayout engine from a background thread的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: wpf 将Style应用到 ListVi
- 下一篇: swift学习笔记之-协议