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

# menu(for:)

Gets the menu for the specified menu identifier.

## Declaration

```swift
func menu(for identifier: UIMenu.Identifier) -> UIMenu?
```

## Parameters

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

## Return Value

Return Value A menu object; otherwise, nil if there are no menus with the specified identifier.

## See Also

### Getting menu systems and elements

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