indexOfItem(withTag:)
Returns the index of the menu item with the specified tag.
Declaration
func indexOfItem(withTag tag: Int) -> IntParameters
- tag:
The tag of the menu item you want.
Return Value
The index of the item or -1 if no item with the specified tag was found.
Discussion
Tags are values your application assigns to an object to identify it. You can assign tags to menu items using the setTag: method of NSMenuItem.