---
title: "init(style:title:handler:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uicontextualaction/init(style:title:handler:)"
---

# init(style:title:handler:)

Creates a new contextual action with the specified title and handler.

## Declaration

```swift
convenience init(style: UIContextualAction.Style, title: String?, handler: @escaping UIContextualAction.Handler)
```

## Parameters

- `style`: The style information to apply to the action button.
- `title`: The title of the action button.
- `handler`: The handler to execute when the user selects the action.

## Return Value

Return Value An initialized contextual action object.
