---
title: textViewportLayoutController
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstextlayoutmanager/textviewportlayoutcontroller
---

# textViewportLayoutController

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

## Declaration

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

## Discussion

Discussion The value of this property is nil if the text layout manager’s text container is nil. Set textContainer before accessing this property.

## See Also

### Causing layout generation

- [invalidateLayout(for:)](appkit/nstextlayoutmanager/invalidatelayout(for:).md)
- [textLayoutFragment(for:)](appkit/nstextlayoutmanager/textlayoutfragment(for:)-68dez.md)
- [textLayoutFragment(for:)](appkit/nstextlayoutmanager/textlayoutfragment(for:)-4dhrx.md)
- [ensureLayout(for:)](appkit/nstextlayoutmanager/ensurelayout(for:)-6ptsj.md)
- [ensureLayout(for:)](appkit/nstextlayoutmanager/ensurelayout(for:)-3duae.md)
- [enumerateTextLayoutFragments(from:options:using:)](appkit/nstextlayoutmanager/enumeratetextlayoutfragments(from:options:using:).md)
- [NSTextLayoutManager.SegmentType](appkit/nstextlayoutmanager/segmenttype.md)
- [NSTextLayoutManager.SegmentOptions](appkit/nstextlayoutmanager/segmentoptions.md)
