<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextFinder/cancelFindIndicator()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextFinder(im)cancelFindIndicator"
  },
  "title" : "cancelFindIndicator()"
}
-->

# cancelFindIndicator()

Cancels the find indicator immediately.

```
func cancelFindIndicator()
```

## Discussion

There may be some circumstances where the find indicator should be immediately cancelled or hidden, such as when the view’s content or selection is changed without the knowledge of the text finder. This method will immediately cancel the current find indicator.

The `NSTextFinder` and `NSView` classes will handle the find indicator correctly when a content view is resized, moved, or removed from the view hierarchy. If your content view’s scrolling is done by an `NSScrollView`, the find indicator will also be handled for you during scrolling.

## See Also

[`findIndicatorNeedsUpdate`](/documentation/AppKit/NSTextFinder/findIndicatorNeedsUpdate)

Invoke to specify that the find indicator needs updating when not contained within a scroll view.



---

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)