---
title: primaryAction
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uibarbuttonitem/primaryaction
---

# primaryAction

The action associated with the item.

## Declaration

```swift
@NSCopying var primaryAction: UIAction? { get set }
```

## Discussion

Discussion When you assign a new value to this property, the title and image of the item update to match the primary action’s title and image. If this property has a non-nil value, the system ignores the item’s target and action properties.

## See Also

### Managing the action

- [changesSelectionAsPrimaryAction](uikit/uibarbuttonitem/changesselectionasprimaryaction.md)
- [action](uikit/uibarbuttonitem/action.md)
- [target](uikit/uibarbuttonitem/target.md)
