<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextFinder/Action",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSTextFinderAction"
  },
  "title" : "NSTextFinder.Action"
}
-->

# NSTextFinder.Action

These constants specify the user interface item tags that correspond find action. These constants are passed to the [`performTextFinderAction(_:)`](/documentation/AppKit/NSResponder/performTextFinderAction(_:)) method, the responder will call the appropriate method for the tag. That method will, in turn, determine the desired action and invoke the appropriate method in the `NSTextFinder` object’s `NSTextFinderClient` protocol.

```
enum Action
```

## Topics

### Constants

[`NSTextFinderActionShowFindInterface`](/documentation/AppKit/NSTextFinder/Action/showFindInterface)

The find bar interface is displayed.

[`NSTextFinderActionNextMatch`](/documentation/AppKit/NSTextFinder/Action/nextMatch)

The next match, if any, is displayed.

[`NSTextFinderActionPreviousMatch`](/documentation/AppKit/NSTextFinder/Action/previousMatch)

The previous match, if any, is displayed.

[`NSTextFinderActionReplaceAll`](/documentation/AppKit/NSTextFinder/Action/replaceAll)

All occurrences of the string are replaced.

[`NSTextFinderActionReplace`](/documentation/AppKit/NSTextFinder/Action/replace)

Replaces a single instance of the string.

[`NSTextFinderActionReplaceAndFind`](/documentation/AppKit/NSTextFinder/Action/replaceAndFind)

Replaces a single instance of the string and searches for the next match.

[`NSTextFinderActionSetSearchString`](/documentation/AppKit/NSTextFinder/Action/setSearchString)

Sets the search string.

[`NSTextFinderActionReplaceAllInSelection`](/documentation/AppKit/NSTextFinder/Action/replaceAllInSelection)

Replaces all occurrences of the string within the current selection.

[`NSTextFinderActionSelectAll`](/documentation/AppKit/NSTextFinder/Action/selectAll)

Selects all matching search strings.

[`NSTextFinderActionSelectAllInSelection`](/documentation/AppKit/NSTextFinder/Action/selectAllInSelection)

Selects all matching search strings within the current selection.

[`NSTextFinderActionHideFindInterface`](/documentation/AppKit/NSTextFinder/Action/hideFindInterface)

Hides the find bar interface.

[`NSTextFinderActionShowReplaceInterface`](/documentation/AppKit/NSTextFinder/Action/showReplaceInterface)

Displays the find bar interface including the replace functionality.

[`NSTextFinderActionHideReplaceInterface`](/documentation/AppKit/NSTextFinder/Action/hideReplaceInterface)

Displays the find bar interface including the replace functionality.

## Relationships

### Conforms To

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

---

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)