Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS - UITableView refresh table properly?

I have lots of data and lots of rows in my tableView. when data changes I want to update my visible cells on the screen, I really don't want to use reloadData because it's an expensive call.

Is it possible to somehow update the visible cells only? I tried calling : beginUpdate & endUpdate on the table, but that doesn't work all the time?

Any suggestions?

like image 998
aryaxt Avatar asked Oct 18 '11 00:10

aryaxt


1 Answers

You can:

[tableView reloadRowsAtIndexPaths:[tableView indexPathsForVisibleRows] 
                 withRowAnimation:UITableViewRowAnimationNone];
like image 178
Seamus Campbell Avatar answered Oct 17 '22 20:10

Seamus Campbell