---
title: "indexPathForItem(at:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicollectionview/indexpathforitem(at:)"
---

# indexPathForItem(at:)

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

## Declaration

```swift
func indexPathForItem(at point: CGPoint) -> IndexPath?
```

## Parameters

- `point`: A point in the collection view’s coordinate system.

## Return Value

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

## Discussion

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](uikit/uicollectionview/indexpathsforvisibleitems.md)
- [indexPath(for:)](uikit/uicollectionview/indexpath(for:).md)
- [cellForItem(at:)](uikit/uicollectionview/cellforitem(at:).md)
- [indexPathsForVisibleSupplementaryElements(ofKind:)](uikit/uicollectionview/indexpathsforvisiblesupplementaryelements(ofkind:).md)
- [supplementaryView(forElementKind:at:)](uikit/uicollectionview/supplementaryview(forelementkind:at:).md)
- [visibleSupplementaryViews(ofKind:)](uikit/uicollectionview/visiblesupplementaryviews(ofkind:).md)
