init(title:action:)
Creates and returns a menu-item object initialized with the given title and action.
Declaration
init(title: String, action: Selector)Parameters
- title:
The title of the menu item.
- action:
A selector identifying the method of the responder object to invoke for handling the command represented by the menu item.
Return Value
An initialized UIMenuItem object, or nil if there was a problem creating the object.