Instance Method


Asks the receiving responder to validate the command.


func validate(_ command: UICommand)



A mutable command object.


Override this method in your view controller to make changes to a command before the command system renders it as a menu item.

See Also

Building and Validating Commands

func canPerformAction(Selector, withSender: Any?) -> Bool

Requests the receiving responder to enable or disable the specified command in the user interface.

func target(forAction: Selector, withSender: Any?) -> Any?

Returns the target object that responds to an action.

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