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

# selectItem(withTitle:)

Selects the item with the specified title.

## Declaration

```swift
func selectItem(withTitle title: String)
```

## Parameters

- `title`: The title of the item to select. If you specify an empty string, or a string that does not match the title of a menu item, this method deselects the currently selected item.

## See Also

### Related Documentation

- [indexOfItem(withTitle:)](appkit/nspopupbutton/indexofitem(withtitle:).md)
- [addItem(withTitle:)](appkit/nspopupbutton/additem(withtitle:).md)
- [setTitle(_:)](appkit/nspopupbutton/settitle(_:).md)

### Setting the current selection

- [select(_:)](appkit/nspopupbutton/select(_:).md)
- [selectItem(at:)](appkit/nspopupbutton/selectitem(at:).md)
- [selectItem(withTag:)](appkit/nspopupbutton/selectitem(withtag:).md)
