Contents

spellingState

The spelling state of the text.

Declaration

static let spellingState: NSAttributedString.Key

Discussion

The value of this attribute is an integer. The default value of this key is 0, which indicates that there are no grammar or spelling errors. Specify a different value to indicate that a spelling or grammar error exists.

This key is available in macOS 10.2 and later, but its interpretation changed in OS X v10.5. Previously, any non-zero value caused the spelling indicator to be displayed. For macOS 10.5 and later, the (integer) value is treated as being composed of the spelling and grammar flags. See NSSpellingStateAttributeName Flags for possible values.

See Also

Getting text attribute keys