Instance Method


Invoked to allow the delegate to modify the text checking process before it occurs.


- (NSDictionary<NSTextCheckingOptionKey, id> *)textView:(NSTextView *)view willCheckTextInRange:(NSRange)range options:(NSDictionary<NSTextCheckingOptionKey, id> *)options types:(NSTextCheckingTypes *)checkingTypes;



The text view sending the message.


The range to be checked.


A dictionary of values used during the checking process to perform. See Spell Checking Option Dictionary Keys for the supported values.


The type of checking to be performed, passed by-reference. The possible constants are listed in NSTextCheckingTypes and can be combined using the C bit-wise OR operator to perform multiple checks at the same time.

You can change this parameter to alter the types of checking to be performed.

Return Value

A dictionary containing an alternative to the options dictionary.


Invoked by checkTextInRange:types:options:, this method allows control over text checking optionss (via the return value) or types (by modifying the flags pointed to by the inout parameter checkingTypes)

See Also

Working With the Spelling Checker

- textView:shouldSetSpellingState:range:

Sent when the spelling state is changed.

- textView:didCheckTextInRange:types:options:results:orthography:wordCount:

Invoked to allow the delegate to modify the text checking results after checking has occurred.