---
title: "presentOptionsMenu(from:in:animated:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uidocumentinteractioncontroller/presentoptionsmenu(from:in:animated:)"
---

# presentOptionsMenu(from:in:animated:)

Displays an options menu and anchors it to the specified location in the view.

## Declaration

```swift
func presentOptionsMenu(from rect: CGRect, in view: UIView, animated: Bool) -> Bool
```

## Parameters

- `rect`: The location (in the coordinate system of view) at which to anchor the menu.
- `view`: The view from which to display the options menu.
- `animated`: Specify doc://com.apple.documentation/documentation/Swift/true to animate the appearance of the menu or doc://com.apple.documentation/documentation/Swift/false to display it immediately.

## Return Value

Return Value true if the options menu was displayed or false if it was not. The options menu may not be displayed in cases where there are no appropriate items to include in the menu.

## Discussion

Discussion The contents of the options menu are built dynamically based on three things: The type of the document (as specified by the uti property) The set of installed apps that have registered support for opening documents The actions that you have indicated as supported in the document interaction controller delegate’s documentInteractionController(_:canPerformAction:) method Options that cannot be performed on the current document are not included in the menu. For example, if the document cannot be opened by any known apps, the menu does not include options for opening it. This method displays the options menu asynchronously. The menu is dismissed automatically when the user selects one of the available options. You can also dismiss it programmatically using the dismissMenu(animated:) method. To instead present a menu that contains only a list of apps capable of opening the current document, the presentOpenInMenu(from:in:animated:) method instead.

## See Also

### Presenting and dismissing menus

- [presentOptionsMenu(from:animated:)](uikit/uidocumentinteractioncontroller/presentoptionsmenu(from:animated:).md)
- [presentOpenInMenu(from:in:animated:)](uikit/uidocumentinteractioncontroller/presentopeninmenu(from:in:animated:).md)
- [presentOpenInMenu(from:animated:)](uikit/uidocumentinteractioncontroller/presentopeninmenu(from:animated:).md)
- [dismissMenu(animated:)](uikit/uidocumentinteractioncontroller/dismissmenu(animated:).md)
