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

# removeItem(withTitle:)

Removes the item with the specified title from the menu.

## Declaration

```swift
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

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

- [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(at:)](appkit/nspopupbutton/removeitem(at:).md)
