Type Method

actionWithTitle:style:handler:

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

Declaration

+ (instancetype)actionWithTitle:(NSString *)title style:(UIPreviewActionStyle)style handler:(void (^)(UIPreviewAction *action, UIViewController *previewViewController))handler;

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

handler

The block called when the peek quick action is selected by the user.

Deprecated

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software