---
title: "supplementaryView(forElementKind:at:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicollectionview/supplementaryview(forelementkind:at:)"
---

# supplementaryView(forElementKind:at:)

Gets the supplementary view at the specified index path.

## Declaration

```swift
func supplementaryView(forElementKind elementKind: String, at indexPath: IndexPath) -> UICollectionReusableView?
```

## Parameters

- `elementKind`: The kind of supplementary view to locate. This value is defined by the layout object. This parameter must not be nil.
- `indexPath`: The index path of the supplementary view. This parameter must not be nil.

## Return Value

Return Value The specified supplementary view, or nil if the view could not be found.

## See Also

### Locating items and views in the collection view

- [indexPathForItem(at:)](uikit/uicollectionview/indexpathforitem(at:).md)
- [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)
- [visibleSupplementaryViews(ofKind:)](uikit/uicollectionview/visiblesupplementaryviews(ofkind:).md)
