Contents

temporaryAttributes(atCharacterIndex:effectiveRange:)

Returns the dictionary of temporary attributes for the specified character range.

Declaration

func temporaryAttributes(atCharacterIndex charIndex: Int, effectiveRange effectiveCharRange: NSRangePointer?) -> [NSAttributedString.Key : Any]

Return Value

The dictionary of temporary attributes for the character range specified in effectiveCharRange at character index charIndex.

Discussion

Temporary attributes are used only for onscreen drawing and are not persistent in any way. NSTextView uses them to color misspelled words when continuous spell checking is enabled. Currently the only temporary attributes recognized are those that do not affect layout (colors, underlines, and so on).

See Also

Managing temporary attribute support