tags:

views:

54

answers:

1

hi, i have tabbar controller, first tab is for Tableview controller.but i do xml parsing in appldidfinish method , in the xml parse didEndElement, i calculate items count and i give it into first tab's Tableview controller's numberOfRowsInSection,but after xml parsing finished, the following method wont be called. tableview is empty....? -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

return [myParser.items count];

}

i have declared in view did load method of that table view controller

myParser = [[XMLMyParser alloc] init]; any help please.....
+1  A: 

When the XML parsing is complete, you need to inform the table view that the data has changed. You do this by sending the reloadData message to your table view instance:

[myTableView reloadData];

Assuming you're using the NSXMLParser, you will need to add this in parserDidEndDocument message of your NSXMLParserDelegate implementation

Alex Deem
how can i identify , in which method,xml parsing has been finished....?
Mikhail Naimy