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

# item(withTitle:)

Returns the menu item with the specified title.

```
func item(withTitle title: String) -> NSMenuItem?
```

## Parameters

`title`

The title of the menu item you want.

## Return Value

The menu item, or `nil` if no item with the specified title exists in the menu.

## See Also

[`-  indexOfItemWithTitle:`](/documentation/AppKit/NSPopUpButton/indexOfItem(withTitle:))

Returns the index of the item with the specified title.

[`-  addItemWithTitle:`](/documentation/AppKit/NSPopUpButton/addItem(withTitle:))

Adds an item with the specified title to the end of the menu.

[`-  selectItemWithTitle:`](/documentation/AppKit/NSPopUpButton/selectItem(withTitle:))

Selects the item with the specified title.



---

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)