---
title: visibleItems()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nscollectionview/visibleitems()
---

# visibleItems()

Returns an array of the actively managed items in the collection view.

## Declaration

```swift
func visibleItems() -> [NSCollectionViewItem]
```

## Return Value

Return Value An array of NSCollectionViewItem objects. The returned array may be empty.

## Discussion

Discussion The items returned by this method represent the ones that are active and currently being managed by the collection view. This array may contain items that are outside of the collection view’s actual visible rectangle. For example, it may contain items that were recently visible but have since been scrolled out of view. To test whether an item is actually visible, check to see if its frame rectangle intersects the visibleRect of the collection view.

## See Also

### Locating Items and Views

- [indexPathsForVisibleItems()](appkit/nscollectionview/indexpathsforvisibleitems().md)
- [visibleSupplementaryViews(ofKind:)](appkit/nscollectionview/visiblesupplementaryviews(ofkind:).md)
- [indexPathsForVisibleSupplementaryElements(ofKind:)](appkit/nscollectionview/indexpathsforvisiblesupplementaryelements(ofkind:).md)
- [indexPath(for:)](appkit/nscollectionview/indexpath(for:).md)
- [indexPathForItem(at:)](appkit/nscollectionview/indexpathforitem(at:).md)
- [item(at:)](appkit/nscollectionview/item(at:)-2vx2h.md)
- [supplementaryView(forElementKind:at:)](appkit/nscollectionview/supplementaryview(forelementkind:at:).md)
- [scrollToItems(at:scrollPosition:)](appkit/nscollectionview/scrolltoitems(at:scrollposition:).md)
