Type Method

alternateWithTitle:action:modifierFlags:

Creates a command alternative with the specified title, action, and modifier flags.

Declaration

+ (instancetype)alternateWithTitle:(NSString *)title action:(SEL)action modifierFlags:(UIKeyModifierFlags)modifierFlags;

Parameters

title

The command alternative's title.

action

The action to take after the user selects the alternative command.

modifierFlags

The bit mask of modifier keys that the user must press. You can use this parameter to specify which modifier keys (Command, Option, and so on) the user must also press. You may specify more than one modifier key. For a list of possible values, see UIKeyModifierFlags.

Return Value

A command alternative object.

See Also

Creating a Command Alternative