我正在尝试在UIWebview.I中加载推特链接。我遇到了NSURLErrorDomain错误
The operation couldn’t be completed.(NSURLErrorDomain error -999.) 我已经通过编写代码解决了这个问题
if([error code] == NSURLErrorCancelled) {**
return;
}在didFailLoadWithError委托方法中。
在此之后,每次解决此错误后,我使用NSURLErrorDomain error.But都没有问题,应用程序由于错误而崩溃
bool _WebTryThreadLock(bool), 0x5f82bf0: 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...请帮我解决这个错误。
提前谢谢。
发布于 2012-02-01 07:06:29
您不应该在另一个线程上使用您的UIWebView或UIWebViewDelegate。在main之外的线程上使用UIKit将导致线程锁定,并且很可能会崩溃。
https://stackoverflow.com/questions/8005656
复制相似问题