<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSMatrix/mode-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMatrix(py)mode"
  },
  "title" : "mode"
}
-->

# mode

The selection mode of the receiver.

```
var mode: NSMatrix.Mode { get set }
```

## Discussion

See [`NSMatrix.Mode`](/documentation/AppKit/NSMatrix/Mode-swift.enum) for possible values.

## See Also

[`init(frame:mode:cellClass:numberOfRows:numberOfColumns:)`](/documentation/AppKit/NSMatrix/init(frame:mode:cellClass:numberOfRows:numberOfColumns:))

Initializes and returns a newly allocated matrix of the specified size using cells of the given class.

[`init(frame:mode:prototype:numberOfRows:numberOfColumns:)`](/documentation/AppKit/NSMatrix/init(frame:mode:prototype:numberOfRows:numberOfColumns:))

Initializes and returns a newly allocated matrix of the specified size using the given cell as a prototype.



---

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)