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

# textView(_:didCheckTextIn:types:options:results:orthography:wordCount:)

Invoked to allow the delegate to modify the text checking results after checking has occurred.

```
@MainActor optional func textView(_ view: NSTextView, didCheckTextIn range: NSRange, types checkingTypes: NSTextCheckingTypes, options: [NSSpellChecker.OptionKey : Any] = [:], results: [NSTextCheckingResult], orthography: NSOrthography, wordCount: Int) -> [NSTextCheckingResult]
```

## Parameters

`view`

The text view sending the message.

`range`

The range that was checked.

`checkingTypes`

The type of checking that was 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`

A dictionary of values used during the checking process to perform. See Spell Checking Option Dictionary Keys for the supported values.

`results`

An array of <doc://com.apple.documentation/documentation/Foundation/NSTextCheckingResult> instances.

`orthography`

The orthography of the text.

`wordCount`

The number of words checked.

## Return Value

An array of <doc://com.apple.documentation/documentation/Foundation/NSTextCheckingResult> instances. You can return the results array as is, or an altered array of <doc://com.apple.documentation/documentation/Foundation/NSTextCheckingResult> objects.

## Discussion

Invoked by [`handleTextCheckingResults(_:forRange:types:options:orthography:wordCount:)`](/documentation/AppKit/NSTextView/handleTextCheckingResults(_:forRange:types:options:orthography:wordCount:)), this method allows observation of text checking, or modification of the results

---

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)