Contents

indexOfItem(withTitle:)

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

Declaration

func indexOfItem(withTitle title: String) -> Int

Parameters

  • title:

    The title of a menu item in 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