<!--
{
  "availability" : [
    "iOS: 3.2.0 -",
    "iPadOS: 3.2.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDocumentInteractionController/dismissMenu(animated:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIDocumentInteractionController(im)dismissMenuAnimated:"
  },
  "title" : "dismissMenu(animated:)"
}
-->

# dismissMenu(animated:)

Dismisses the currently active menu.

```
func dismissMenu(animated: Bool)
```

## Parameters

`animated`

Specify <doc://com.apple.documentation/documentation/Swift/true> to animate the dismissal of the currently active menu or <doc://com.apple.documentation/documentation/Swift/false> to dismiss it immediately.

## Discussion

Use this method to dismiss a menu programmatically. The document interaction controller can also dismiss the menu automatically in response to user actions.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)