近日编码,将uiwebview在一个thread中使用了,得到如下提示“

void _WebThreadLockFromAnyThread(bool), 0x8e68890: Obtaining the web lock from a thread other than the main thread or the web thread. UIKit should not be called from a secondary thread.

核心的意思”UIKit should not be called from a secondary thread.“,IOS中不能把与uikit相关的操作(主要是UI控件的操作)放到一个新键线程中去(secondary thread),这会引起线程冲突。


下面是之前搜索到的相关说明的截图

UIKit should not be called from a secondary thread.

获取线程的调用结果。。

UIKit should not be called from a secondary thread.


相关文章: