<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextView/handleTextCheckingResults(_:forRange:types:options:orthography:wordCount:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextView(im)handleTextCheckingResults:forRange:types:options:orthography:wordCount:"
  },
  "title" : "handleTextCheckingResults(_:forRange:types:options:orthography:wordCount:)"
}
-->

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

Handles the text checking results returned by the text view

```
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

The [`NSTextViewDelegate`](/documentation/AppKit/NSTextViewDelegate) offers a method, [`textView(_:didCheckTextIn:types:options:results:orthography:wordCount:)`](/documentation/AppKit/NSTextViewDelegate/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.

---

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)