I have a application, what is download a xml file and after parser it. After the processing data visualize in a table view. Problem: When I download and parser the data I change the view (Sample viewController -> UITableViewcontroller). The tableview doesn’t reloadData.
First I download the XML from the server. After I hand to the XML parser the data:
NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithData:data];
XMLParser *parser = [[XMLParser alloc] initXMLParser];
[xmlParser setDelegate:parser];
When The XML parser complite the uitableview appeared.
Then I like to update the uitableview, but I don’t know, how I do.
I try to use the following commands after the XML parser:
[[contactlist tableView] reloadData];
[[contactlist tableView]performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:YES];
Thanks the answer!
Your xml data won’t automatically show up on a table view by reloading it.
Your xml parser will have to get the data into an array (of string values, dictionaries or objects etc).
Your view controller needs to implement the table view delegate and data source methods in which you’ll have to populate each cell in the table.
To learn how to use a table view check TableViewSuite code sample.