An object you use to check a string (usually the text of a document) for misspelled words.


@interface UITextChecker : NSObject


UITextChecker spell-checks using a lexicon for a given language. You can tell it to ignore specific words when spell-checking a particular document and you can have it learn words, which adds those words to the lexicon. You generally use one instance of UITextChecker per document, although you can use a single instance to spell-check related pieces of text if you want to share ignored words and other state.

You may also use a text checker to obtain completions for partially entered words, as well as possible replacements for misspelled words, which you then can present to users.


Initiating a Spell Check

- rangeOfMisspelledWordInString:range:startingAt:wrap:language:

Initiates a search of a range of a string for a misspelled word.

Obtaining Word Guesses and Completions

- guessesForWordRange:inString:language:

Returns a list of words that are possible valid replacements for a misspelled word.

- completionsForPartialWordRange:inString:language:

Returns an array of strings that are possible completions for a partially entered word.

Learning and Ignoring Words

- ignoreWord:

Tells the receiver to ignore the specified word when spell-checking.


Returns the words that the receiver ignores when spell-checking.

+ learnWord:

Tells the text checker to learn the specified word so that it is not evaluated as misspelled.

+ unlearnWord:

Tells the text checker to unlearn the specified word

+ hasLearnedWord:

Returns whether the text checker has learned the specified word.

Getting the Available Languages


Returns the languages for which the text checker’s class can perform spell-checking.


Inherits From