---
title: textView
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstextcontainer/textview
---

# textView

The text container’s text view.

## Declaration

```swift
weak var textView: NSTextView? { get set }
```

## Discussion

Discussion A text container doesn’t need a text view to calculate line fragment rectangles, but must have one to display text. You can use this property to disconnect a text view from a group of text system objects by sending this message to its text container and passing nil as aTextView.

## See Also

### Managing text components

- [layoutManager](appkit/nstextcontainer/layoutmanager.md)
- [textLayoutManager](appkit/nstextcontainer/textlayoutmanager.md)
- [replaceLayoutManager(_:)](appkit/nstextcontainer/replacelayoutmanager(_:).md)
