---
title: NSSpellChecker
framework: appkit
role: symbol
role_heading: Class
path: appkit/nsspellchecker
---

# NSSpellChecker

An interface to the Cocoa spell-checking service.

## Declaration

```swift
class NSSpellChecker
```

## Overview

Overview To handle all its spell checking, an app needs only one instance of NSSpellChecker, known as the spell checker. Using the spell checker you manage the Spelling panel, in which the user can specify decisions about words that are suspect. The spell checker also offers the ability to provide word completions to augment the text completion system.

## Topics

### Getting the Spell Checker

- [shared](appkit/nsspellchecker/shared.md)
- [sharedSpellCheckerExists](appkit/nsspellchecker/sharedspellcheckerexists.md)

### Configuring Spell Checkers Languages

- [availableLanguages](appkit/nsspellchecker/availablelanguages.md)
- [userPreferredLanguages](appkit/nsspellchecker/userpreferredlanguages.md)
- [automaticallyIdentifiesLanguages](appkit/nsspellchecker/automaticallyidentifieslanguages.md)
- [language()](appkit/nsspellchecker/language().md)
- [setLanguage(_:)](appkit/nsspellchecker/setlanguage(_:).md)

### Managing Panels

- [spellingPanel](appkit/nsspellchecker/spellingpanel.md)
- [substitutionsPanel](appkit/nsspellchecker/substitutionspanel.md)
- [updateSpellingPanel(withGrammarString:detail:)](appkit/nsspellchecker/updatespellingpanel(withgrammarstring:detail:).md)
- [updatePanels()](appkit/nsspellchecker/updatepanels().md)
- [accessoryView](appkit/nsspellchecker/accessoryview.md)
- [substitutionsPanelAccessoryViewController](appkit/nsspellchecker/substitutionspanelaccessoryviewcontroller.md)

### Checking Strings for Spelling and Grammar

- [countWords(in:language:)](appkit/nsspellchecker/countwords(in:language:).md)
- [checkSpelling(of:startingAt:)](appkit/nsspellchecker/checkspelling(of:startingat:).md)
- [checkSpelling(of:startingAt:language:wrap:inSpellDocumentWithTag:wordCount:)](appkit/nsspellchecker/checkspelling(of:startingat:language:wrap:inspelldocumentwithtag:wordcount:).md)
- [checkGrammar(of:startingAt:language:wrap:inSpellDocumentWithTag:details:)](appkit/nsspellchecker/checkgrammar(of:startingat:language:wrap:inspelldocumentwithtag:details:).md)
- [check(_:range:types:options:inSpellDocumentWithTag:orthography:wordCount:)](appkit/nsspellchecker/check(_:range:types:options:inspelldocumentwithtag:orthography:wordcount:).md)
- [requestChecking(of:range:types:options:inSpellDocumentWithTag:completionHandler:)](appkit/nsspellchecker/requestchecking(of:range:types:options:inspelldocumentwithtag:completionhandler:).md)
- [guesses(forWordRange:in:language:inSpellDocumentWithTag:)](appkit/nsspellchecker/guesses(forwordrange:in:language:inspelldocumentwithtag:).md)

### Managing the Spell-Checking Process

- [uniqueSpellDocumentTag()](appkit/nsspellchecker/uniquespelldocumenttag().md)
- [closeSpellDocument(withTag:)](appkit/nsspellchecker/closespelldocument(withtag:).md)
- [ignoreWord(_:inSpellDocumentWithTag:)](appkit/nsspellchecker/ignoreword(_:inspelldocumentwithtag:).md)
- [ignoredWords(inSpellDocumentWithTag:)](appkit/nsspellchecker/ignoredwords(inspelldocumentwithtag:).md)
- [setIgnoredWords(_:inSpellDocumentWithTag:)](appkit/nsspellchecker/setignoredwords(_:inspelldocumentwithtag:).md)
- [setWordFieldStringValue(_:)](appkit/nsspellchecker/setwordfieldstringvalue(_:).md)
- [updateSpellingPanel(withMisspelledWord:)](appkit/nsspellchecker/updatespellingpanel(withmisspelledword:).md)
- [completions(forPartialWordRange:in:language:inSpellDocumentWithTag:)](appkit/nsspellchecker/completions(forpartialwordrange:in:language:inspelldocumentwithtag:).md)
- [hasLearnedWord(_:)](appkit/nsspellchecker/haslearnedword(_:).md)
- [unlearnWord(_:)](appkit/nsspellchecker/unlearnword(_:).md)
- [learnWord(_:)](appkit/nsspellchecker/learnword(_:).md)
- [userQuotesArray(forLanguage:)](appkit/nsspellchecker/userquotesarray(forlanguage:).md)
- [userReplacementsDictionary](appkit/nsspellchecker/userreplacementsdictionary.md)

### Data Detector Interaction

- [menu(for:string:options:atLocation:in:)](appkit/nsspellchecker/menu(for:string:options:atlocation:in:).md)
- [NSSpellChecker.OptionKey](appkit/nsspellchecker/optionkey.md)

### Automatic Spelling Correction

- [correction(forWordRange:in:language:inSpellDocumentWithTag:)](appkit/nsspellchecker/correction(forwordrange:in:language:inspelldocumentwithtag:).md)
- [showCorrectionIndicator(of:primaryString:alternativeStrings:forStringIn:view:completionHandler:)](appkit/nsspellchecker/showcorrectionindicator(of:primarystring:alternativestrings:forstringin:view:completionhandler:).md)
- [record(_:toCorrection:forWord:language:inSpellDocumentWithTag:)](appkit/nsspellchecker/record(_:tocorrection:forword:language:inspelldocumentwithtag:).md)
- [dismissCorrectionIndicator(for:)](appkit/nsspellchecker/dismisscorrectionindicator(for:).md)
- [NSSpellChecker.CorrectionIndicatorType](appkit/nsspellchecker/correctionindicatortype.md)
- [NSSpellChecker.CorrectionResponse](appkit/nsspellchecker/correctionresponse.md)

### Notifications

- [didChangeAutomaticSpellingCorrectionNotification](appkit/nsspellchecker/didchangeautomaticspellingcorrectionnotification.md)
- [didChangeAutomaticTextReplacementNotification](appkit/nsspellchecker/didchangeautomatictextreplacementnotification.md)

### Type Properties

- [didChangeAutomaticCapitalizationNotification](appkit/nsspellchecker/didchangeautomaticcapitalizationnotification.md)
- [didChangeAutomaticDashSubstitutionNotification](appkit/nsspellchecker/didchangeautomaticdashsubstitutionnotification.md)
- [didChangeAutomaticPeriodSubstitutionNotification](appkit/nsspellchecker/didchangeautomaticperiodsubstitutionnotification.md)
- [didChangeAutomaticQuoteSubstitutionNotification](appkit/nsspellchecker/didchangeautomaticquotesubstitutionnotification.md)
- [didChangeAutomaticTextCompletionNotification](appkit/nsspellchecker/didchangeautomatictextcompletionnotification.md)
- [isAutomaticCapitalizationEnabled](appkit/nsspellchecker/isautomaticcapitalizationenabled.md)
- [isAutomaticDashSubstitutionEnabled](appkit/nsspellchecker/isautomaticdashsubstitutionenabled.md)
- [isAutomaticInlinePredictionEnabled](appkit/nsspellchecker/isautomaticinlinepredictionenabled.md)
- [isAutomaticPeriodSubstitutionEnabled](appkit/nsspellchecker/isautomaticperiodsubstitutionenabled.md)
- [isAutomaticQuoteSubstitutionEnabled](appkit/nsspellchecker/isautomaticquotesubstitutionenabled.md)
- [isAutomaticSpellingCorrectionEnabled](appkit/nsspellchecker/isautomaticspellingcorrectionenabled.md)
- [isAutomaticTextCompletionEnabled](appkit/nsspellchecker/isautomatictextcompletionenabled.md)
- [isAutomaticTextReplacementEnabled](appkit/nsspellchecker/isautomatictextreplacementenabled.md)

### Instance Methods

- [deletesAutospaceBetweenString(_:andString:language:)](appkit/nsspellchecker/deletesautospacebetweenstring(_:andstring:language:).md)
- [language(forWordRange:in:orthography:)](appkit/nsspellchecker/language(forwordrange:in:orthography:).md)
- [preventsAutocorrection(before:language:)](appkit/nsspellchecker/preventsautocorrection(before:language:).md)
- [requestCandidates(forSelectedRange:in:types:options:inSpellDocumentWithTag:completionHandler:)](appkit/nsspellchecker/requestcandidates(forselectedrange:in:types:options:inspelldocumentwithtag:completionhandler:).md)
- [showInlinePrediction(forCandidates:client:)](appkit/nsspellchecker/showinlineprediction(forcandidates:client:).md)

### Structures

- [NSSpellChecker.DidChangeAutomaticCapitalizationMessage](appkit/nsspellchecker/didchangeautomaticcapitalizationmessage.md)
- [NSSpellChecker.DidChangeAutomaticDashSubstitutionMessage](appkit/nsspellchecker/didchangeautomaticdashsubstitutionmessage.md)
- [NSSpellChecker.DidChangeAutomaticInlinePredictionMessage](appkit/nsspellchecker/didchangeautomaticinlinepredictionmessage.md)
- [NSSpellChecker.DidChangeAutomaticPeriodSubstitutionMessage](appkit/nsspellchecker/didchangeautomaticperiodsubstitutionmessage.md)
- [NSSpellChecker.DidChangeAutomaticQuoteSubstitutionMessage](appkit/nsspellchecker/didchangeautomaticquotesubstitutionmessage.md)
- [NSSpellChecker.DidChangeAutomaticSpellingCorrectionMessage](appkit/nsspellchecker/didchangeautomaticspellingcorrectionmessage.md)
- [NSSpellChecker.DidChangeAutomaticTextCompletionMessage](appkit/nsspellchecker/didchangeautomatictextcompletionmessage.md)
- [NSSpellChecker.DidChangeAutomaticTextReplacementMessage](appkit/nsspellchecker/didchangeautomatictextreplacementmessage.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)

## See Also

### Spell-checking

- [NSChangeSpelling](appkit/nschangespelling.md)
- [NSIgnoreMisspelledWords](appkit/nsignoremisspelledwords.md)
