<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPopUpButton/removeItem(withTitle:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPopUpButton(im)removeItemWithTitle:"
  },
  "title" : "removeItem(withTitle:)"
}
-->

# removeItem(withTitle:)

Removes the item with the specified title from the menu.

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

This method removes the first item it finds with the specified name. This method then uses [`synchronizeTitleAndSelectedItem()`](/documentation/AppKit/NSPopUpButton/synchronizeTitleAndSelectedItem()) to refresh the menu.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)