Instance Method

removeItemAtIndex:

Removes the item at the specified index.

Declaration

- (void)removeItemAtIndex:(NSInteger)index;

Parameters

index

The zero-based index indicating which item to remove. Specifying 0 removes the item at the top of the menu.

Discussion

After removing the item, this method uses the synchronizeTitleAndSelectedItem method to make sure the title displayed matches the currently selected item.

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.

- removeItemWithTitle:

Removes the item with the specified title from the menu.