I am making an nav based app. in my table view i am parsing a xml and showing its data. when i enter new feed item in my xml and click refresh button, my data updates but it didn't appear in tableView untill i scroll it down. When i scroll it down it appears. Can anybody tell me why its happening like that? I want new data appear when i enter the feed item without scrolling my tableView down. Thanx for help
7 Answers
you need to call [self.tableView reloadData]
to update the tableView with new contents

- 10,802
- 4
- 33
- 38
Did you call [tableView reloadData] when the data has been refreshed?

- 824
- 1
- 8
- 13
I'm not exactly sure what you mean. A simple reload is:
[myTableView reloadData]
in the UITableViwController
[self.tableView reloadData]
If you scroll down, new cells that are rendered will use the new data. but cells that are on display have to be told to update immediatly.

- 1,171
- 7
- 21
You need to reload the cells (or the entire table) for the new data to appear. Depending on if you return parsed results right away or all results after the entire xml-file has been parsed.
The code to update the table is:
[myTableView reloadData];

- 56,267
- 18
- 167
- 205
You have to call [tableView reloadData] to refresh the data from the UITableView.

- 963
- 1
- 8
- 29
Not just -reloadData, you can use any of these:
- reloadData
- reloadRowsAtIndexPaths:withRowAnimation:
- reloadSections:withRowAnimation:
- reloadSectionIndexTitles
Basically, you'll need to tell your tableview that your data has changed so it knows to change that. You can do it with fancy animations and whatnot so that the user isn't confused when what's displayed on screen suddenly changes.

- 1,698
- 13
- 17