Contents

textViewportLayoutController(_:configureRenderingSurfaceFor:)

The method the framework calls when the layout controller lays out a text layout fragment in the UI.

Declaration

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

Parameters

  • textViewportLayoutController:

    The NSTextViewportLayoutController associated with this text layout fragment.

  • textLayoutFragment:

    An NSTextLayoutFragment.

Discussion

The delegate presents the text layout fragment in the UI, for example, in a sublayer or a subview. Layout information such as viewportBounds on textViewportLayoutController isn’t up to date at the point of this call.

See Also

Responding to changes in the viewport