Contents

textView(_:shouldSetSpellingState:range:)

Sent when the spelling state is changed.

Declaration

@MainActor optional func textView(_ textView: NSTextView, shouldSetSpellingState value: Int, range affectedCharRange: NSRange) -> Int

Parameters

  • textView:

    The text view sending the message.

  • value:

    The proposed spelling state value to set. Possible values, for the temporary attribute on the layout manager using the key NSSpellingStateAttributeName, are:

  • affectedCharRange:

    The character range over which to set the given spelling state.

Return Value

The actual spelling state to set.

Discussion

Delegate only. Allows delegate to control the setting of spelling and grammar indicators.

See Also

Related Documentation

Working With the Spelling Checker