Contents

indexOfItem(withRepresentedObject:)

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

Declaration

func indexOfItem(withRepresentedObject object: Any?) -> Int

Parameters

  • object:

    A represented object of the menu.

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