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

# action

The selector defining the action message to send to the target object when the user taps this bar button item.

## Declaration

```swift
var action: Selector? { get set }
```

## Discussion

Discussion If the value of this property is nil, no action message is sent. The default value is nil.

## See Also

### Managing the action

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