Contents

index(of:)

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

Declaration

func index(of item: NSMenuItem) -> Int

Parameters

  • 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.

See Also

Related Documentation

Finding Indices of Menu Items