---
title: "action(for:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uimenubuilder/action(for:)"
---

# action(for:)

Gets the action for the specified action identifier.

## Declaration

```swift
func action(for identifier: UIAction.Identifier) -> UIAction?
```

## Parameters

- `identifier`: The identifier of the action to retrieve.

## Return Value

Return Value An action object; otherwise, nil if there are no actions with the specified identifier.

## See Also

### Getting menu systems and elements

- [system](uikit/uimenubuilder/system.md)
- [menu(for:)](uikit/uimenubuilder/menu(for:).md)
- [command(for:propertyList:)](uikit/uimenubuilder/command(for:propertylist:).md)
