---
title: UIContextualAction.Handler
framework: uikit
role: symbol
role_heading: Type Alias
path: uikit/uicontextualaction/handler-swift.typealias
---

# UIContextualAction.Handler

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

## Declaration

```swift
@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:

## See Also

### Getting the configuration details

- [handler](uikit/uicontextualaction/handler-swift.property.md)
- [style](uikit/uicontextualaction/style-swift.property.md)
- [UIContextualAction.Style](uikit/uicontextualaction/style-swift.enum.md)
