Instance Method

addKeyCommand:

Associates the specified keyboard shortcut with the view controller.

Declaration

- (void)addKeyCommand:(UIKeyCommand *)keyCommand;

Parameters

keyCommand

The key command to add.

Discussion

This method lets you easily add key commands to the view controller without overriding the keyCommands property. The key commands you add to a view controller are applied to the active responder chain. When the user performs a key command, UIKit searches the responder chain (starting with the first responder) for an object capable of handling the specified action.

See Also

Accessing the Available Key Commands

performsActionsWhilePresentingModally

A Boolean value indicating whether the view controller performs menu-related actions.

- removeKeyCommand:

Removes the key command from the view controller.