views:

237

answers:

2

I have a table view which i want to populate with the results (XML) of my call to a web service.

The NSURLConnection and NSMutableURLRequest that are doing the setup for this are currently in my -viewDidLoad method, and i also have all of my UITableView delegate methods in my .m file too.

The data is being returned and added to my array correctly. My problem is (i think) that the UITableView methods are being called before any data has been returned from the web service, which is why my table view is always blank.

How can i call the methods in the right order (if this is even the problem)...

A: 

Are you calling reloadData on the tableview once you've repopulated the array? You need to let it know that you have new data.

Douglas Mayle
how would i do this? thanks.
joec
I tried [self.listTableView reloadData] after my array was populated, but got the error "accessing unknown listTableView getter method". Please help.
joec
A: 

Check out Apple's SeismicXML code example on the developer.apple.com/iphone site. It shows how to use NSURL, NSXMLParser, and a TableView to do just this type of thing.

Travis