How to get indexPath.row of tableView which is currently being displayed?

前端 未结 5 2028
执笔经年
执笔经年 2021-01-02 05:19

I have a tableView with many values.

I want to get the first indexPath.row value of the table which is being displayed currently.

How can I do

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-02 05:40

    You can use: [self.tableView visibleCells]

    That will return a nsarray of UITableViewCell objects, each representing a visible cell in the receiving table view.

    http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UITableView_Class/Reference/Reference.html

提交回复
热议问题