What Needs To Be on Main Thread?

后端 未结 3 1686
执念已碎
执念已碎 2021-01-02 23:47

I have written a little define called ensureInMainThread (and I use it quite a bit). However, I\'m not sure exactly which user interface methods require bei

3条回答
  •  遥遥无期
    2021-01-03 00:42

    With iOS 12, if you call setNeedsDisplay from a background thread, you get the following assert:

    Main Thread Checker: UI API called on a background thread: -[UIView setNeedsDisplay]

提交回复
热议问题