indexPathForItem(at:)
Gets the index path of the item at the specified point in the collection view.
Declaration
func indexPathForItem(at point: CGPoint) -> IndexPath?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.