---
title: "collectionView(_:indexPathForIndexTitle:at:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicollectionviewdatasource/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.

## Declaration

```swift
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 doc://com.apple.uikit/documentation/UIKit/UICollectionViewDataSource/indexTitles(for:) method.
- `index`: The index into the array returned by the doc://com.apple.uikit/documentation/UIKit/UICollectionViewDataSource/indexTitles(for:) method that corresponds to the index title.

## Return Value

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

## Discussion

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:) method, the collection view calls this method for each string to fetch the collection view item to use as the scrolling destination.

## See Also

### Configuring an index

- [indexTitles(for:)](uikit/uicollectionviewdatasource/indextitles(for:).md)
