Type Method

actionWithTitle:image:identifier:handler:

Creates an action.

Declaration

+ (instancetype)actionWithTitle:(NSString *)title image:(UIImage *)image identifier:(UIActionIdentifier)identifier handler:(UIActionHandler)handler;

Parameters

title

The title to display for the action.

image

The image to display next to the action's title. Only the contextSystem menu system supports the display of an image, and only when the app is running in iOS.

identifier

The unique identifier for the action. Specify nil to let this method create a unique identifier for you.

handler

The handler invoked after the user selects the action. This handler has the following parameter:

action

The action selected by the user.

Return Value

A newly initialized action object.

See Also

Creating an Action

UIActionIdentifier

A type that represents an action identifier.

UIActionHandler

A type that defines the block for an action handler.