---
title: "canPerformAction(_:withSender:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/uihostingcontroller/canperformaction(_:withsender:)"
---

# canPerformAction(_:withSender:)

## Declaration

```swift
@MainActor @preconcurrency override dynamic func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool
```
