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

# heightTracksTextView

A Boolean that controls whether the text container adjusts the height of its bounding rectangle when its text view resizes.

```
var heightTracksTextView: Bool { get set }
```

## Discussion

When the value of this property is <doc://com.apple.documentation/documentation/Swift/true>, the text container adjusts its height when the height of its text view changes. The default value of this property is <doc://com.apple.documentation/documentation/Swift/false>.

For more information, see [`NSTextContainer`](/documentation/AppKit/NSTextContainer).

---

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)