Contents

index(of:)

Returns the index of the specified menu item.

Declaration

func index(of item: NSMenuItem) -> Int

Parameters

  • item:

    The menu item whose index you want.

Return Value

The index of the item or -1 if no such item was found.

Discussion

This method invokes the method of the same name of its NSPopUpButtonCell object.

See Also

Getting the indices of menu items