开发者

Objective C, A Question about tab bar and multi thread

I have 开发者_StackOverflow社区a UITabBar which has 5 menus. Two of five menus spawn a new thread in viewWillAppear method. In the method, it sends HTTP request to a web server on background. The web server returns data in XML format. After it receives the data, it parses the data and stores the data into local NSMutable array. This part works great but the problem is that if I clicked on one of the tabbar menu from the menu that spawns a new thread, the application crashes. I commented spawning the new thread part out then the application doesn't crash...What might cause this problem?


With no source code it's not easy to tell, but I had similar problems with returning background threads who's delegates where released, because user did something different while the thread was running.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜