Instance Method

removeItemWithTitle:

Removes the item with the specified title from the menu.

Declaration

- (void)removeItemWithTitle:(NSString *)title;

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.

See Also

Inserting and deleting items

- addItemWithTitle:

Adds an item with the specified title to the end of the menu.

- addItemsWithTitles:

Adds multiple items to the end of the menu.

- insertItemWithTitle:atIndex:

Inserts an item at the specified position in the menu.

- removeAllItems

Removes all items in the receiver’s item menu.

- removeItemAtIndex:

Removes the item at the specified index.