views:

135

answers:

1

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?