---
title: "textViewportLayoutController(_:configureRenderingSurfaceFor:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitextview/textviewportlayoutcontroller(_:configurerenderingsurfacefor:)"
---

# textViewportLayoutController(_:configureRenderingSurfaceFor:)

NSTextViewportLayoutControllerDelegate method that the framework calls when the layout controller lays out a text layout fragment in the UI. Requires a call to super.

## Declaration

```swift
func textViewportLayoutController(_ textViewportLayoutController: NSTextViewportLayoutController, configureRenderingSurfaceFor textLayoutFragment: NSTextLayoutFragment)
```

## Mentioned in

Managing viewport layout and attachment reuse in text views
