<!--
{
  "availability" : [
    "macOS: 10.11.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCollectionView/indexPathForItem(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCollectionView(im)indexPathForItemAtPoint:"
  },
  "title" : "indexPathForItem(at:)"
}
-->

# indexPathForItem(at:)

Returns the index path of the item at the specified point.

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

## Parameters

`point`

The point in the collection view’s bounds that you want to test.

## Return Value

The item at the specified point or `nil` if no item was found at that point.

## Discussion

This method uses the available layout attributes to determine which item is at the specified point. If more than one item is at the point, this method returns only the top-most item. This method ignores the opacity of the item, so items that are fully transparent are still returned by this method. Hidden items are never returned.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)