<!--
{
  "availability" : [
    "iOS: 3.2.0 -",
    "iPadOS: 3.2.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextChecker",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITextChecker"
  },
  "title" : "UITextChecker"
}
-->

# UITextChecker

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

```
@MainActor class UITextChecker
```

## Overview

[`UITextChecker`](/documentation/UIKit/UITextChecker) spell-checks using a lexicon for a specific 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`](/documentation/UIKit/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.

## Topics

### Initiating a Spell Check

[`rangeOfMisspelledWord(in:range:startingAt:wrap:language:)`](/documentation/UIKit/UITextChecker/rangeOfMisspelledWord(in:range:startingAt:wrap:language:))

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

### Obtaining Word Guesses and Completions

[`guesses(forWordRange:in:language:)`](/documentation/UIKit/UITextChecker/guesses(forWordRange:in:language:))

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

[`completions(forPartialWordRange:in:language:)`](/documentation/UIKit/UITextChecker/completions(forPartialWordRange:in:language:))

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

### Learning and Ignoring Words

[`ignoreWord(_:)`](/documentation/UIKit/UITextChecker/ignoreWord(_:))

Tells the text checker to ignore the specified word when spell-checking.

[`ignoredWords`](/documentation/UIKit/UITextChecker/ignoredWords)

Returns the words that the text checker ignores when spell-checking.

[`learnWord(_:)`](/documentation/UIKit/UITextChecker/learnWord(_:))

Tells the text checker to learn the specified word so that it doesn’t evaluate it as misspelled.

[`unlearnWord(_:)`](/documentation/UIKit/UITextChecker/unlearnWord(_:))

Tells the text checker to unlearn the specified word.

[`hasLearnedWord(_:)`](/documentation/UIKit/UITextChecker/hasLearnedWord(_:))

Returns whether the text checker has learned the specified word.

### Getting the Available Languages

[`availableLanguages`](/documentation/UIKit/UITextChecker/availableLanguages)

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



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)