Contents

enumerateRenderingAttributes(from:reverse:using:)

Enumerates the rendering attributes from a location you specify.

Declaration

func enumerateRenderingAttributes(from location: any NSTextLocation, reverse: Bool, using block: (NSTextLayoutManager, [NSAttributedString.Key : Any], NSTextRange) -> Bool)

Parameters

  • location:

    The location at which to start the enumeration.

  • reverse:

    Whether to start the enumeration from the end of the range.

  • block:

    A closure you provide to determine if the enumeration finishes early.

Discussion

This method only enumerates ranges with text that specify rendering attributes. Returning false from block breaks out of the enumeration.

See Also

Adjusting rendering