Instance Method

indexPathsForRowsInRect:

An array of index paths, each representing a row enclosed by a given rectangle.

Declaration

- (NSArray<NSIndexPath *> *)indexPathsForRowsInRect:(CGRect)rect;

Parameters

rect

A rectangle defining an area of the table view in local coordinates.

Return Value

An array of NSIndexPath objects each representing a row and section index identifying a row within rect. Returns an empty array if there aren’t any rows to return.

See Also

Getting Cells and Section-Based Views

- cellForRowAtIndexPath:

Returns the table cell at the specified index path.

- headerViewForSection:

Returns the header view associated with the specified section.

- footerViewForSection:

Returns the footer view associated with the specified section.

- indexPathForCell:

Returns an index path representing the row and section of a given table-view cell.

- indexPathForRowAtPoint:

Returns an index path identifying the row and section at the given point.

visibleCells

The table cells that are visible in the table view.

indexPathsForVisibleRows

An array of index paths, each identifying a visible row in the table view.