---
title: selectionIndexes
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nscollectionview/selectionindexes
---

# selectionIndexes

The indexes of the currently selected items.

## Declaration

```swift
var selectionIndexes: IndexSet { get set }
```

## Discussion

Discussion Whenever possible, use the selectionIndexPaths property instead of this one to set selections. This property is observable using key-value observing.

## See Also

### Legacy Collection View Support

- [itemPrototype](appkit/nscollectionview/itemprototype.md)
- [newItem(forRepresentedObject:)](appkit/nscollectionview/newitem(forrepresentedobject:).md)
- [maxNumberOfRows](appkit/nscollectionview/maxnumberofrows.md)
- [maxNumberOfColumns](appkit/nscollectionview/maxnumberofcolumns.md)
- [minItemSize](appkit/nscollectionview/minitemsize.md)
- [maxItemSize](appkit/nscollectionview/maxitemsize.md)
- [item(at:)](appkit/nscollectionview/item(at:)-80xze.md)
- [frameForItem(at:)](appkit/nscollectionview/frameforitem(at:).md)
- [frameForItem(at:withNumberOfItems:)](appkit/nscollectionview/frameforitem(at:withnumberofitems:).md)
- [draggingImageForItems(at:with:offset:)](appkit/nscollectionview/draggingimageforitems(at:with:offset:)-951w7.md)
- [setDraggingSourceOperationMask(_:forLocal:)](appkit/nscollectionview/setdraggingsourceoperationmask(_:forlocal:).md)
