Contents

NSAttributedString.Key

The attributes you apply to ranges of characters in an attributed string.

Declaration

struct Key

Discussion

The NSAttributedString.Key type defines the attributes you apply to ranges of characters in an attributed string. Some attributes provide information about how to render, lay out, or interpret the text, while other attributes provide transient or collaborative information. Attributes like the font, kern, and strokeColor contain information that the rendering system uses to display the text. Attributes like the spellingState, textHighlightStyle, or accessibilityCustomText contain semantic information from other parts of the system. Some of these semantic attributes also affect how the system renders the text, but they are transient attributes unlike the core rendering attributes.

Topics

Getting rendering attribute keys

Getting text attribute keys

Getting attachment attribute keys

Getting accessibility attribute keys

Getting Markdown attribute keys

Getting translation-related attribute keys

Getting formatting attribute keys

Deprecated Keys

Initializers

Type Properties

See Also

Getting text content attributes