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

# selectItem(at:)

Selects the item in the menu at the specified index.

## Declaration

```swift
func selectItem(at index: Int)
```

## Parameters

- `index`: The index of the item you want to select, or -1 you want to deselect all menu items.

## See Also

### Related Documentation

- [indexOfSelectedItem](appkit/nspopupbutton/indexofselecteditem.md)

### Setting the current selection

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