---
title: indexPathsForVisibleItems
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uicollectionview/indexpathsforvisibleitems
---

# indexPathsForVisibleItems

An array of the visible items in the collection view.

## Declaration

```swift
var indexPathsForVisibleItems: [IndexPath] { get }
```

## Discussion

Discussion The value of this property is an unsorted array of NSIndexPath objects, each of which corresponds to a visible cell in the collection view. This array doesn’t include any supplementary views that are currently visible. If there are no visible items, the value of this property is an empty array.

## See Also

### Related Documentation

- [visibleCells](uikit/uicollectionview/visiblecells.md)

### Locating items and views in the collection view

- [indexPathForItem(at:)](uikit/uicollectionview/indexpathforitem(at:).md)
- [indexPath(for:)](uikit/uicollectionview/indexpath(for:).md)
- [cellForItem(at:)](uikit/uicollectionview/cellforitem(at:).md)
- [indexPathsForVisibleSupplementaryElements(ofKind:)](uikit/uicollectionview/indexpathsforvisiblesupplementaryelements(ofkind:).md)
- [supplementaryView(forElementKind:at:)](uikit/uicollectionview/supplementaryview(forelementkind:at:).md)
- [visibleSupplementaryViews(ofKind:)](uikit/uicollectionview/visiblesupplementaryviews(ofkind:).md)
