<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIContextualAction/Handler-swift.typealias",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@T@UIContextualActionHandler"
  },
  "title" : "UIContextualAction.Handler"
}
-->

# UIContextualAction.Handler

The handler block to call in response to the selection of an action.

```
@MainActor typealias Handler = (UIContextualAction, UIView, @escaping (Bool) -> Void) -> Void
```

## Parameters

`action`

The object containing information about the selected action.

`sourceView`

The view in which the action was displayed.

`completionHandler`

The handler block for you to execute after you have performed the action. This block has no return value and takes the following parameter:

- actionPerformed: A Boolean value indicating whether you performed the action. Specify <doc://com.apple.documentation/documentation/Swift/true> if you performed the action or <doc://com.apple.documentation/documentation/Swift/false> if you were unable to perform the action for some reason.

## Discussion

---

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)