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

# init(frame:)

Initializes a newly allocated matrix with the specified frame.

```
convenience init(frame frameRect: NSRect)
```

## Parameters

`frameRect`

The frame with which to initialize the matrix.

## Return Value

The [`NSMatrix`](/documentation/AppKit/NSMatrix), initialized with default parameters. The new [`NSMatrix`](/documentation/AppKit/NSMatrix) contains no rows or columns. The default mode is `NSRadioModeMatrix`. The default cell class is [`NSActionCell`](/documentation/AppKit/NSActionCell).

## Discussion

See [`NSMatrix`](/documentation/AppKit/NSMatrix).

---

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)