<!--
{
  "availability" : [
    "iOS: 9.0.0 - 13.0.0",
    "iPadOS: 9.0.0 - 13.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "tvOS: 9.0.0 - 13.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIPreviewAction/init(title:style:handler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIPreviewAction(cm)actionWithTitle:style:handler:"
  },
  "title" : "init(title:style:handler:)"
}
-->

# init(title:style:handler:)

Creates a peek quick action using a specified title, style, and handler.

```
convenience init(title: String, style: UIPreviewAction.Style, handler: @escaping (UIPreviewAction, UIViewController) -> Void)
```

## Parameters

`title`

The quick action’s title.

`style`

The quick action’s style. For a complete list of styles, see the `UIPreviewActionStyle` enumeration in *UIPreviewActionItem Protocol Reference*.

`handler`

A block that is called when the user selects the peek quick action. The block takes the following parameters:

- action: The peek quick action selected by the user.
- previewViewController: The view controller displayed as the peek.

## Return Value

A newly-created peek quick action.

---

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)