how to know which cells (row & section) of a UITableView are currently being displayed?
Is there a way to know which rows/sections are being displayed inside a UITableView ? I kno开发者_开发百科w I can use the function :
tableView:(UITableView *) tableView willDisplayCell:(UITableViewCell *) cell forRowAtIndexPath:(NSIndexPath *)indexPath
But, this doesnt help me. For any given moment, I want to know which row/sections are being displayed and do some processing based on that.
Can anyone kindly help me ? Thanks.
At any given moment, you can retrieve the visible cells from the table view, or index paths :
-(NSArray *)visibleCells;
-(NSArray *)indexPathsForVisibleRows;
Check UITableView Class Reference
精彩评论