Question

I'm pulling in xml using the cocoa NSXmlParser. Since this process most likely won't finish before my view is loaded I want to move it to a secondary thread like I have seen in many examples including the seismicxml example on the apple site.

The flow of my application is as follows. I have a table view which cells can be clicked to get to another tableview which is populated by nsxmlparser.

I know this is how you populate an object if you are doing your logic in the app delegate:

[(id)[[UIApplication neare] delegate] performSelectorOnMainThread:@selector(addToBusStopList:) withObject:busStop waitUntilDone:YES];

but how do you do this if you are working in the table view controller like I am?

Was it helpful?

Solution

When the parser finishes can't you tell the tableview to update itself:

[tableView reloadData];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top