Crash in actionForLayer:forKey:

后端 未结 2 1498
说谎
说谎 2021-01-04 09:54

I have a cryptic EXC_BAD_ACCESS when changing some UILabel\'s frame. The crash is random, usually I have to repeat the conditions for several minutes.

Enabling NSZom

2条回答
  •  孤街浪徒
    2021-01-04 10:21

    This crash has non-main threads that appear to use UIKit classes or functions. Generally speaking, it is only safe to use UIKit from the main thread. Calling into UIKit from background threads can cause unpredictable behavior (like crashes!). Please double check that all of your code (that is not on the main thread) has been explicitly marked as safe to use in the background by Apple.

    External resources:

    UIKit Framework Reference

提交回复
热议问题