---
title: selectedItem
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nspopupbuttoncell/selecteditem
---

# selectedItem

The menu item last selected by the user.

## Declaration

```swift
var selectedItem: NSMenuItem? { get }
```

## Discussion

Discussion The value of this property is the menu item that is currently selected, or nil if no item is selected. The last selected menu item is the one that was highlighted when the user released the mouse button. It is possible for a pull-down menu’s selected item to be its first item.

## See Also

### Dealing with selection

- [select(_:)](appkit/nspopupbuttoncell/select(_:).md)
- [selectItem(at:)](appkit/nspopupbuttoncell/selectitem(at:).md)
- [selectItem(withTag:)](appkit/nspopupbuttoncell/selectitem(withtag:).md)
- [selectItem(withTitle:)](appkit/nspopupbuttoncell/selectitem(withtitle:).md)
- [setTitle(_:)](appkit/nspopupbuttoncell/settitle(_:).md)
- [indexOfSelectedItem](appkit/nspopupbuttoncell/indexofselecteditem.md)
- [synchronizeTitleAndSelectedItem()](appkit/nspopupbuttoncell/synchronizetitleandselecteditem().md)
