You can use:
tableView.visibleCells
This is the array UITableViewCellthat is currently displayed in the table view.
If you only need the index paths of the visible lines, you can use:
tableView.indexPathsForVisibleRows
which is an array of objects IndexPath.
source
share