---
title: "deselectItems(at:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscollectionview/deselectitems(at:)"
---

# deselectItems(at:)

Removes the specified items from the current selection.

## Declaration

```swift
func deselectItems(at indexPaths: Set<IndexPath>)
```

## Parameters

- `indexPaths`: The index paths of the items you want to deselect.

## Discussion

Discussion Use this method to reduce the current selection. If you want to animate the deselection of the new items, call this method on the collection view’s animator() proxy object instead. This method does not call any methods of the delegate object when making the selection.

## See Also

### Managing the Selection

- [isSelectable](appkit/nscollectionview/isselectable.md)
- [allowsMultipleSelection](appkit/nscollectionview/allowsmultipleselection.md)
- [allowsEmptySelection](appkit/nscollectionview/allowsemptyselection.md)
- [selectionIndexPaths](appkit/nscollectionview/selectionindexpaths.md)
- [selectAll(_:)](appkit/nscollectionview/selectall(_:).md)
- [deselectAll(_:)](appkit/nscollectionview/deselectall(_:).md)
- [selectItems(at:scrollPosition:)](appkit/nscollectionview/selectitems(at:scrollposition:).md)
