<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "tvOS: 10.2.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollectionViewDataSource/collectionView(_:indexPathForIndexTitle:at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UICollectionViewDataSource(im)collectionView:indexPathForIndexTitle:atIndex:"
  },
  "title" : "collectionView(_:indexPathForIndexTitle:at:)"
}
-->

# collectionView(_:indexPathForIndexTitle:at:)

Asks the data source to return the index path of a collection view item that corresponds to one of your index entries.

```
optional func collectionView(_ collectionView: UICollectionView, indexPathForIndexTitle title: String, at index: Int) -> IndexPath
```

## Parameters

`collectionView`

The collection view requesting this information.

`title`

The title of the index item. This string corresponds to one of the strings you returned in your [`indexTitles(for:)`](/documentation/UIKit/UICollectionViewDataSource/indexTitles(for:)) method.

`index`

The index into the array returned by the [`indexTitles(for:)`](/documentation/UIKit/UICollectionViewDataSource/indexTitles(for:)) method that corresponds to the index title.

## Return Value

The index path for the collection view item that should appear when the user selects the index.

## Discussion

Use this method to support fast scrolling through your collection view’s content. After returning a set of index strings from your [`indexTitles(for:)`](/documentation/UIKit/UICollectionViewDataSource/indexTitles(for:)) method, the collection view calls this method for each string to fetch the collection view item to use as the scrolling destination.

---

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)