removeTemporaryAttribute(_:forCharacterRange:)
Removes a temporary attribute from the list of attributes for the specified character range.
Declaration
func removeTemporaryAttribute(_ attrName: NSAttributedString.Key, forCharacterRange charRange: NSRange)Parameters
- attrName:
The name of a temporary attribute.
- charRange:
The range of characters from which to remove the specified temporary attribute.
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
addTemporaryAttributes(_:forCharacterRange:)addTemporaryAttribute(_:value:forCharacterRange:)setTemporaryAttributes(_:forCharacterRange:)temporaryAttribute(_:atCharacterIndex:effectiveRange:)temporaryAttribute(_:atCharacterIndex:longestEffectiveRange:in:)temporaryAttributes(atCharacterIndex:effectiveRange:)temporaryAttributes(atCharacterIndex:longestEffectiveRange:in:)