Instance Method


Associates the specified keyboard shortcut with the view controller.


func addKeyCommand(_ keyCommand: UIKeyCommand)



The key command to add.


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

var performsActionsWhilePresentingModally: Bool

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

func removeKeyCommand(UIKeyCommand)

Removes the key command from the view controller.