---
title: "indexPathsForVisibleSupplementaryElements(ofKind:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicollectionview/indexpathsforvisiblesupplementaryelements(ofkind:)"
---

# indexPathsForVisibleSupplementaryElements(ofKind:)

Gets the index paths of all visible supplementary views of the specified type.

## Declaration

```swift
func indexPathsForVisibleSupplementaryElements(ofKind elementKind: String) -> [IndexPath]
```

## Parameters

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

## Return Value

Return Value An array of NSIndexPath objects, each of which corresponds to a visible supplementary view in the collection view. If there are no visible supplementary views, this method returns an empty array.

## 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)
- [supplementaryView(forElementKind:at:)](uikit/uicollectionview/supplementaryview(forelementkind:at:).md)
- [visibleSupplementaryViews(ofKind:)](uikit/uicollectionview/visiblesupplementaryviews(ofkind:).md)
