---
title: changesSelectionAsPrimaryAction
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uibarbuttonitem/changesselectionasprimaryaction
---

# changesSelectionAsPrimaryAction

A Boolean value that indicates whether the button represents an action or selection.

## Declaration

```swift
var changesSelectionAsPrimaryAction: Bool { get set }
```

## Discussion

Discussion When a button has this property set to true, the button changes to a toggle button where tapping it changes it between selected and unselected.

## See Also

### Managing the action

- [primaryAction](uikit/uibarbuttonitem/primaryaction.md)
- [action](uikit/uibarbuttonitem/action.md)
- [target](uikit/uibarbuttonitem/target.md)
