Alex Alex - 8 months ago 27
iOS Question

How to create indexpaths for all rows and all sections for uitableview?

I have a table with n sections. Each section contains one row. How to create the index path for the table?
There is a method that allows to create index path for all visible rows

[self.tableView indexPathsForVisibleRows]
I need something similar like

I need all this to update only the data in the table, because method
[self.tableView reloadData];
updates all the table with headers and footers. That's why i have to use


You don't need reload all the rows. You only need to reload the visible cells (that is why indexPathsForVisibleRows exists).

The cells that are off-screen will get their new data in cellForRowAtIndexPath: once they become visible.