开发者

Problem with Threading

I am getting following error when i tried to make a thread for an image uploading and parsing..

error

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...

I have tested this method with other simple statements but when i tried to access content from web t开发者_如何学Gohis error arises...

Can any one tell me how to solve this problem


This has been coming up often recently, including quite a few times on SO.

Here is one:

Error message that UIKit should not be called from a secondary thread


You are probably accessing some of the UIKit objects (adding/removing subviews, changing text etc.) from the secondary thread. If you do need to do that, then use performSelectorOnMainThread

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜