Contents

customAttribute(_:)

Adds a custom attribute to the text view.

Declaration

func customAttribute<T>(_ value: T) -> Text where T : TextAttribute

Parameters

  • value:

    The attribute to attach.

Return Value

A version of the text view with value attached.

Discussion

Only one attribute of each type may be attached to each text view, with inner attributes taking precedence.