Requests that the string be checked in the background.
- macOS 10.6+
The string to check.
The range of the string to check.
The type of checking to be performed. The possible constants are listed in
NSTextand can be combined using the C bit-wise
Checking Result .Checking Type
ORoperator to perform multiple checks at the same time.
The options dictionary specifying the types of checking to perform. See Spell Checking Option Dictionary Keys for the possible keys and expected values.
An identifier unique within the application used to inform the spell checker which document that text is associated, potentially for many purposes, not necessarily just for ignored words. A value of 0 can be passed in for text not associated with a particular document.
The completion handler block object will be called (in an arbitrary context) when results are available, with the sequence number and results.
The block takes four arguments:
A monotonically increasing sequence number.
An array of
NSTextobjects describing particular items found during checking and their individual ranges, sorted by range origin, then range end, then result type..
The orthography of the string.
The number of words in the range of the string.
The return value is a monotonically increasing sequence number that can be used to keep track of requests in flight.