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

# init(frame:)

Initializes a text view.

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

## Parameters

`frameRect`

The frame rectangle of the text view.

## Return Value

An initialized text view.

## Discussion

This method creates the entire collection of objects associated with a text view—its text container, layout manager, and text storage—and invokes [`init(frame:textContainer:)`](/documentation/AppKit/NSTextView/init(frame:textContainer:)).

This method creates the text web in such a manner that the text view is the principal owner of the objects in the web.

---

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)