returned nil from -traitCollection, which is not allowed in Xcode 11 Beta

后端 未结 3 1193
北恋
北恋 2020-12-04 02:10

Assertion failure in UITraitCollection * _Nonnull returned nil from -traitCollection, which is not allowed? when I try to run Xcode 11 beta in ios 13 it crashed. I don\'t kn

3条回答
  •  Happy的楠姐
    2020-12-04 02:34

    This is how iOS 13 and Xcode 11 deal with the main thread checker inconsistencies.

    basically, you are updating the UI from a background thread. Just make sure you're updating all your UI in the main thread.

    Simply wrap the code that updates your UI inside DispatchQueue.main.async { }.

提交回复
热议问题