Instance Method

indexOfItemWithSubmenu:

Returns the index of the menu item in the menu with the given submenu.

Declaration

- (NSInteger)indexOfItemWithSubmenu:(NSMenu *)submenu;

Parameters

anObject

A menu object that is a menu item of the menu (that is, a submenu).

Return Value

The integer index of the menu item or, if no such menu item is in the menu, –1.

See Also

Finding Indices of Menu Items

- indexOfItem:

Returns the index identifying the location of a specified menu item in the menu.

- indexOfItemWithTitle:

Returns the index of the first menu item in the menu that has a specified title.

- indexOfItemWithTag:

Returns the index of the first menu item in the menu identified by a tag.

- indexOfItemWithTarget:andAction:

Returns the index of the first menu item in the menu that has a specified action and target.

- indexOfItemWithRepresentedObject:

Returns the index of the first menu item in the menu that has a given represented object.