---
title: deselectSelectedCell()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nsmatrix/deselectselectedcell()
---

# deselectSelectedCell()

Deselects the selected cell or cells.

## Declaration

```swift
func deselectSelectedCell()
```

## Discussion

Discussion If the selection mode is NSRadioModeMatrix and empty selection is not allowed, or if nothing is currently selected, this method does nothing. This method doesn’t redisplay the receiver.

## See Also

### Related Documentation

- [mode](appkit/nsmatrix/mode-swift.property.md)
- [allowsEmptySelection](appkit/nsmatrix/allowsemptyselection.md)

### Selecting and Deselecting Cells

- [selectCell(atRow:column:)](appkit/nsmatrix/selectcell(atrow:column:).md)
- [selectCell(withTag:)](appkit/nsmatrix/selectcell(withtag:).md)
- [selectAll(_:)](appkit/nsmatrix/selectall(_:).md)
- [keyCell](appkit/nsmatrix/keycell.md)
- [setSelectionFrom(_:to:anchor:highlight:)](appkit/nsmatrix/setselectionfrom(_:to:anchor:highlight:).md)
- [deselectAllCells()](appkit/nsmatrix/deselectallcells().md)
