Instance Method

indexPathForItemAtPoint:

Returns the index path of the item at the specified point in the collection view.

Declaration

- (NSIndexPath *)indexPathForItemAtPoint:(CGPoint)point;

Parameters

point

A point in the collection view’s coordinate system.

Return Value

The index path of the item at the specified point or nil if no item was found at the specified point.

Discussion

This method relies on the layout information provided by the associated layout object to determine which item contains the point.

See Also

Locating Items and Views in the Collection View

indexPathsForVisibleItems

An array of the visible items in the collection view.

- indexPathForCell:

Returns the index path of the specified cell.

- cellForItemAtIndexPath:

Returns the visible cell object at the specified index path.

- indexPathsForVisibleSupplementaryElementsOfKind:

Returns the index paths of all visible supplementary views of the specified type.

- supplementaryViewForElementKind:atIndexPath:

Returns the supplementary view at the specified index path.

- visibleSupplementaryViewsOfKind:

Returns an array of the visible supplementary views of the specified kind.