2011-11-04 74 views
2

我试图加载UIWebview.I Twitter的链接都面临着NSURLErrorDomain错误量,页面错误-999

The operation couldn’t be completed.(NSURLErrorDomain error -999.) 

,我已经在didFailLoadWithError委托编写代码

if([error code] == NSURLErrorCancelled) {** 

return; 

} 

解决它方法。

在此之后,我有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... 

请帮我解决这个错误。

在此先感谢。

回答

1

您不应该在另一个线程上使用您的UIWebViewUIWebViewDelegate。 在主线外的线程上使用UIKit会导致线程锁定,并且很可能会导致崩溃。