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

# synchronizeTitleAndSelectedItem()

Ensures that the item being displayed by the receiver agrees with the selected item.

## Declaration

```swift
func synchronizeTitleAndSelectedItem()
```

## Discussion

Discussion If there’s no selected item, this method selects the first item in the item menu and sets the receiver’s item to match. For pull-down menus, this method makes sure that the first item is being displayed (the NSPopUpButtonCell object must be set to use the selected menu item, which happens by default).

## See Also

### Related Documentation

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