When using the list interface, we all know that
-(NSInteger) tableView :( UITableView *) tableView numberOfRowsInSection :( NSInteger) section
(Method 1)
This method returns several rows of data on this interface, while
-(UITableViewCell *) tableView :( UITableView *) tableView cellForRowAtIndexPath :( NSIndexPath *) indexPath
(Method 2)
This method inputs data for each row,
When we use method 1 to return 0, that is, no rows, method 2 will not be executed.
Their relationships are closely linked. Only when the return value of method 1 is greater than 0 will method 2 be executed to add data.
When we add the parsed xml data to the list for display, the problem arises, because we know that when the project is running, the above method 1, method 2 and so on are the first to run the method for parsing xml data,
Obviously, no value can be output on the interface, so we need to refresh the interface after parsing the xml data:
[Self. tableViewreloadData];
In this way, the parsed data can be obtained and displayed.