<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSMatrix/deselectSelectedCell()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMatrix(im)deselectSelectedCell"
  },
  "title" : "deselectSelectedCell()"
}
-->

# deselectSelectedCell()

Deselects the selected cell or cells.

```
func deselectSelectedCell()
```

## 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

[`var mode: NSMatrix.Mode`](/documentation/AppKit/NSMatrix/mode-swift.property)

The selection mode of the receiver.

[`var allowsEmptySelection: Bool`](/documentation/AppKit/NSMatrix/allowsEmptySelection)

A Boolean that indicates whether a radio-mode matrix supports an empty selection.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)