代码改变世界

UIKit should not be called from a secondary thread.

2012-02-01 09:41  ianwang  阅读(1103)  评论(0编辑  收藏  举报

近日编码,将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),这会引起线程冲突。


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

获取线程的调用结果。。