removeItem(withTitle:)
Removes the item with the specified title from the menu.
Declaration
func removeItem(withTitle title: String)Parameters
- title:
The title of the item you want to remove. If no menu item exists with the specified title, this method triggers an assertion.
Discussion
This method removes the first item it finds with the specified name. This method then uses synchronizeTitleAndSelectedItem() to refresh the menu.