---
title: removeAllItems()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nspopupbutton/removeallitems()
---

# removeAllItems()

Removes all items in the receiver’s item menu.

## Declaration

```swift
func removeAllItems()
```

## Discussion

Discussion After removing the items, this method uses the synchronizeTitleAndSelectedItem() method to refresh the menu.

## See Also

### Related Documentation

- [numberOfItems](appkit/nspopupbutton/numberofitems.md)

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