This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes

前端 未结 6 1744
醉话见心
醉话见心 2020-11-30 06:00

I get this log in the console when I am running my application in is simulator. Haven\'t seen this in iOS 8. I am not quite sure whats causing this. Has anyone else come acr

6条回答
  •  甜味超标
    2020-11-30 06:14

    Should try Symbolic Breakpoint to detect the issue:-

    Symbol:

    [UIView layoutIfNeeded]
    

    Condition:

    !(BOOL)[NSThread isMainThread]
    

    Then put your UI Update code in main thread

    DispatchQueue.main.async {}
    

提交回复
热议问题