<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "tvOS: 17.4.0 -",
    "visionOS: 1.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BrowserEngineKit",
  "identifier" : "/documentation/BrowserEngineKit/BETextInput/canPerformAction(_:withSender:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "BrowserEngineKit"
    ],
    "preciseIdentifier" : "c:objc(pl)BETextInput(im)canPerformAction:withSender:"
  },
  "title" : "canPerformAction(_:withSender:)"
}
-->

# canPerformAction(_:withSender:)

Indicates whether the text view can process a given action.

```
func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool
```

## Parameters

`action`

A selector for the action.

`sender`

The object that’s sending the message.

## Return Value

A Boolean value that indicates whether the text view can handle the action message.

## Discussion

This method is similar to <doc://com.apple.documentation/documentation/ObjectiveC/NSObjectProtocol/responds(to:)>, except that even if your text view implements the action message, it can decline to handle it by returning `false` from this method.

---

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)