Getting a “This application is modifying the autolayout engine from a background thread” error?

后端 未结 21 1667
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-22 15:52

Been encountering this error a lot in my OS X using swift:

\"This application is modifying the autolayout engine from a background thread, which can

21条回答
  •  心在旅途
    2020-11-22 16:31

    I had this problem since updating to the iOS 9 SDK when I was calling a block that did UI updates within an NSURLConnection async request completion handler. Putting the block call in a dispatch_async using dispatch_main_queue solved the issue.

    It worked fine in iOS 8.

提交回复
热议问题