【发布时间】:2011-11-11 00:01:52
【问题描述】:
我使用带有对象映射的 RestKit。这运行 asyncronus 并在从服务器接收数据后更新对象。
关键是,我需要通知另一个类一个对象的属性发生了变化。
现在我遇到了一个错误:
bool _WebTryThreadLock(bool), 0x1ae420: Tried to obtain the web
lock from a thread other than the main thread or the web thread.
This may be a result of calling to UIKit from a secondary thread. Crashing now...
我试图覆盖该属性的设置器,但看起来该属性是在另一个线程中设置的,而不是在主线程中。在那里调用代理不起作用。
我能做些什么来解决这个问题?
感谢任何帮助!
【问题讨论】:
标签: ios delegates nsthread setter