开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜