开发者

Displaying the activityView Indicator well data is downloading

开发者 https://www.devze.com 2022-12-17 01:41 出处:网络
Im currently writing an iphone app that requires the downloading of data that needs to be parsed and added to a tableView. I have that working the only problem is that i currently call the my method t

Im currently writing an iphone app that requires the downloading of data that needs to be parsed and added to a tableView. I have that working the only problem is that i currently call the my method that downloads that data and parses it in the viewDidLoad {} method:

- (void) addData {
   //Download some stuff
   //Parse some stuff
   //Add data to global array
}

This causes my app to hang on a black screen until the function finishes processing. I have tried moving the addData function into a thread but this causes it not to load the data into the tableView.

So my 开发者_高级运维question is... How can i display an activity indicator well i call the addData function?


See followings
http://urenjoy.blogspot.com/2009/05/uiactivityindicatorview.html
http://discussions.apple.com/thread.jspa?threadID=1775984

0

精彩评论

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