---
title: "removeItem(at:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nspopupbutton/removeitem(at:)"
---

# removeItem(at:)

Removes the item at the specified index.

## Declaration

```swift
func removeItem(at index: Int)
```

## Parameters

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

## Discussion

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

- [addItem(withTitle:)](appkit/nspopupbutton/additem(withtitle:).md)
- [addItems(withTitles:)](appkit/nspopupbutton/additems(withtitles:).md)
- [insertItem(withTitle:at:)](appkit/nspopupbutton/insertitem(withtitle:at:).md)
- [removeAllItems()](appkit/nspopupbutton/removeallitems().md)
- [removeItem(withTitle:)](appkit/nspopupbutton/removeitem(withtitle:).md)
