How to Reload a UITableView While I am Looking at It

Genericrich picture Genericrich · Mar 19, 2009 · Viewed 52.3k times · Source

When I have a UITableView as part of the visible view controller, how can I reload it so that the data I am looking at changes to the new data. Just calling reload doesn't seem to refresh the data until I scroll it.

Answer

lostInTransit picture lostInTransit · Mar 19, 2009

Calling the reloadData method refreshes the data as soon as the method is called. It does not wait for the table to be scrolled. Make sure the data source (array or dictionary or wherever you've saved the values) is changed before you call reloadData.