Contents

textElement(for:)

Returns the text element corresponding to object’s attributed string.

Declaration

func textElement(for attributedString: NSAttributedString) -> NSTextElement?

Parameters

  • attributedString:

    The attributed string to map into an Nstextelement.

Return Value

An NSTextElement, or nil.

Discussion

Returns nil when attributedString contains attributes not mappable to NSTextElement.

See Also

Managing text elements