Contents

init(title:style:handler:)

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

Declaration

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.

See Also

Creating a peek quick action