index(of:)
Returns the index identifying the location of a specified menu item in the menu.
Declaration
func index(of item: NSMenuItem) -> IntParameters
- item:
A menu item—that is an object conforming to the NSMenuItem protocol.
Return Value
The integer index of the menu item or, if no such menu item is in the menu, –1.