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

# init(frame:)

Initializes a control with the specified frame rectangle.

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

## Parameters

`frameRect`

The rectangle of the control, specified in points in the coordinate space of the enclosing view.

## Return Value

An initialized control object, or `nil` if the object couldn’t be initialized.

## Discussion

If a cell has been specified for controls of this type, this method also creates an instance of the cell. Because `NSControl` is an abstract class, invocations of this method should appear only in the designated initializers of subclasses; that is, there should always be a more specific designated initializer for the subclass, as this method is the designated initializer for `NSControl`.

## See Also

[`NSControl`](/documentation/AppKit/NSControl)

A specialized view, such as a button or text field, that notifies your app of relevant events using the target-action design pattern.



---

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)