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

# textViewportLayoutController

The text viewport layout controller associated with the layout manager’s text container.

```
var textViewportLayoutController: NSTextViewportLayoutController { get }
```

## Discussion

The value of this property is `nil` if the text layout manager’s text container is `nil`. Set [`textContainer`](/documentation/AppKit/NSTextLayoutManager/textContainer) before accessing this property.

---

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)