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

# dismiss(animated:)

Dismisses the popover programmatically.

```
func dismiss(animated: Bool)
```

## Parameters

`animated`

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

## Discussion

You can use this method to dismiss the popover programmatically in response to taps inside the popover window. Taps outside of the popover’s contents automatically dismiss the popover.

---

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)