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

# target

The object that receives an action when the user selects the item.

## Declaration

```swift
weak var target: AnyObject? { get set }
```

## Discussion

Discussion If nil, the action message is passed up the responder chain where it may be handled by any object implementing a method corresponding to the selector held by the action property. The default value is nil.

## See Also

### Managing the action

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