---
title: "handleTextCheckingResults(_:forRange:types:options:orthography:wordCount:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextview/handletextcheckingresults(_:forrange:types:options:orthography:wordcount:)"
---

# handleTextCheckingResults(_:forRange:types:options:orthography:wordCount:)

Handles the text checking results returned by the text view

## Declaration

```swift
func handleTextCheckingResults(_ results: [NSTextCheckingResult], forRange range: NSRange, types checkingTypes: NSTextCheckingTypes, options: [NSSpellChecker.OptionKey : Any] = [:], orthography: NSOrthography, wordCount: Int)
```

## Parameters

- `results`: An array of doc://com.apple.documentation/documentation/Foundation/NSTextCheckingResult objects.
- `range`: The range of text that was checked.
- `checkingTypes`: The type of checking performed. The possible constants are listed in doc://com.apple.documentation/documentation/Foundation/NSTextCheckingTypes and can be combined using the C bit-wise OR operator to perform multiple checks at the same time.
- `options`: The dictionary of values used during the checking process to perform. See Spell Checking Option Dictionary Keys for the supported values.
- `orthography`: The orthography of the checked text.
- `wordCount`: The number of words.

## Discussion

Discussion The NSTextViewDelegate offers a method, textView(_:didCheckTextIn:types:options:results:orthography:wordCount:) that is called after the checking is performed, allowing you to modify the results. This method usually would not be called directly, since NSTextView itself will call it as needed, but it can be overridden.

## See Also

### Checking and substituting text

- [checkTextInDocument(_:)](appkit/nstextview/checktextindocument(_:).md)
- [checkTextInSelection(_:)](appkit/nstextview/checktextinselection(_:).md)
- [checkText(in:types:options:)](appkit/nstextview/checktext(in:types:options:).md)
- [enabledTextCheckingTypes](appkit/nstextview/enabledtextcheckingtypes.md)
- [isAutomaticDashSubstitutionEnabled](appkit/nstextview/isautomaticdashsubstitutionenabled.md)
- [toggleAutomaticDashSubstitution(_:)](appkit/nstextview/toggleautomaticdashsubstitution(_:).md)
- [isAutomaticDataDetectionEnabled](appkit/nstextview/isautomaticdatadetectionenabled.md)
- [toggleAutomaticDataDetection(_:)](appkit/nstextview/toggleautomaticdatadetection(_:).md)
- [isAutomaticSpellingCorrectionEnabled](appkit/nstextview/isautomaticspellingcorrectionenabled.md)
- [toggleAutomaticSpellingCorrection(_:)](appkit/nstextview/toggleautomaticspellingcorrection(_:).md)
- [isAutomaticTextReplacementEnabled](appkit/nstextview/isautomatictextreplacementenabled.md)
- [toggleAutomaticTextReplacement(_:)](appkit/nstextview/toggleautomatictextreplacement(_:).md)
- [performValidatedReplacement(in:with:)](appkit/nstextview/performvalidatedreplacement(in:with:).md)
