Contents

indexPathsForRows(in:)

Returns an array of index paths, each representing a row that the specified rectangle encloses.

Declaration

func indexPathsForRows(in rect: CGRect) -> [IndexPath]?

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