---
title: synchronizeTitleAndSelectedItem()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nspopupbuttoncell/synchronizetitleandselecteditem()
---

# synchronizeTitleAndSelectedItem()

Synchronizes the pop-up button’s displayed item with the currently selected menu item.

## Declaration

```swift
func synchronizeTitleAndSelectedItem()
```

## Discussion

Discussion If no item is currently selected, this method synchronizes the pop-up buttons displayed item with the first menu item. If the pop-up button cell does not get its displayed item from a menu item, this method does nothing. For pull-down menus, this method sets the displayed item to the title first menu item. If the pop-up button’s menu does not contain any menu items, this method sets the pop-up button’s displayed item to nil, resulting in nothing being displayed in the control.

## 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)
- [selectedItem](appkit/nspopupbuttoncell/selecteditem.md)
- [indexOfSelectedItem](appkit/nspopupbuttoncell/indexofselecteditem.md)
