Reputation: 1213
I am new to iphone development. numberOfRowsInSection method of UITableViewController executed before parsing the XML node so that this method return value as zero, but this method should be return value of number of rows with data.
please help me
thanks.
Upvotes: 1
Views: 828
Reputation: 1213
I solved this problem via made connection between tableView reference and file owner in interface builder.
Upvotes: 0
Reputation: 3704
I've had a similar problem before, and it was because I was passing the array/dictionary to the controller from the appdelegate. Unfortunately, after the app delegate went out of scope, the array was lost.
Try doing an array copy,
NSArray data = [NSArray arrayWithArray: passedInArray];
Sorry, don't have my trusty macbook on me to check the code, but you get the drift.
Upvotes: 0
Reputation: 170839
After parsing of your XML data is finished call [myTable reloadData];
- it will force your UITableView to reload the data shown and thus all necessary methods (including numberOfRowsInSection
) to get called.
Upvotes: 1