---
title: cancelFindIndicator()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nstextfinder/cancelfindindicator()
---

# cancelFindIndicator()

Cancels the find indicator immediately.

## Declaration

```swift
func cancelFindIndicator()
```

## Discussion

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

### Related Documentation

- [findIndicatorNeedsUpdate](appkit/nstextfinder/findindicatorneedsupdate.md)

### Validating and Performing Text Finding

- [performAction(_:)](appkit/nstextfinder/performaction(_:).md)
- [validateAction(_:)](appkit/nstextfinder/validateaction(_:).md)
