---
title: UITextChecker
framework: uikit
role: symbol
role_heading: Class
path: uikit/uitextchecker
---

# UITextChecker

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

## Declaration

```swift
@MainActor class UITextChecker
```

## Overview

Overview 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 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:)](uikit/uitextchecker/rangeofmisspelledword(in:range:startingat:wrap:language:).md)

### Obtaining Word Guesses and Completions

- [guesses(forWordRange:in:language:)](uikit/uitextchecker/guesses(forwordrange:in:language:).md)
- [completions(forPartialWordRange:in:language:)](uikit/uitextchecker/completions(forpartialwordrange:in:language:).md)

### Learning and Ignoring Words

- [ignoreWord(_:)](uikit/uitextchecker/ignoreword(_:).md)
- [ignoredWords](uikit/uitextchecker/ignoredwords.md)
- [learnWord(_:)](uikit/uitextchecker/learnword(_:).md)
- [unlearnWord(_:)](uikit/uitextchecker/unlearnword(_:).md)
- [hasLearnedWord(_:)](uikit/uitextchecker/haslearnedword(_:).md)

### Getting the Available Languages

- [availableLanguages](uikit/uitextchecker/availablelanguages.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
