---
title: "deselectItem(at:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscombobox/deselectitem(at:)"
---

# deselectItem(at:)

Deselects the pop-up list item at the specified index if it’s selected.

## Declaration

```swift
func deselectItem(at index: Int)
```

## Parameters

- `index`: The index of the item to deselect.

## Discussion

Discussion If the selection does in fact change, this method posts an selectionDidChangeNotification to the default notification center.

## See Also

### Related Documentation

- [numberOfItems](appkit/nscombobox/numberofitems.md)

### Manipulating the Selection

- [indexOfSelectedItem](appkit/nscombobox/indexofselecteditem.md)
- [objectValueOfSelectedItem](appkit/nscombobox/objectvalueofselecteditem.md)
- [selectItem(at:)](appkit/nscombobox/selectitem(at:).md)
- [selectItem(withObjectValue:)](appkit/nscombobox/selectitem(withobjectvalue:).md)
