---
title: "popoverPresentationControllerShouldDismissPopover(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uipopoverpresentationcontrollerdelegate/popoverpresentationcontrollershoulddismisspopover(_:)"
---

# popoverPresentationControllerShouldDismissPopover(_:)

Asks the delegate if the popover should be dismissed.

## Declaration

```swift
optional func popoverPresentationControllerShouldDismissPopover(_ popoverPresentationController: UIPopoverPresentationController) -> Bool
```

## Parameters

- `popoverPresentationController`: The popover presentation controller that is managing the popover interface.

## Return Value

Return Value true if the popover should be dismissed or false if it should not.

## Discussion

Discussion The popover presentation controller calls this method in response to user-initiated attempts to dismiss the popover. It is not called when you dismiss the popover programmatically using the dismissModalViewControllerAnimated: method. If you do not implement this method in your delegate, the default return value is assumed to be true.

## See Also

### Presenting and dismissing the popover

- [prepareForPopoverPresentation(_:)](uikit/uipopoverpresentationcontrollerdelegate/prepareforpopoverpresentation(_:).md)
- [popoverPresentationControllerDidDismissPopover(_:)](uikit/uipopoverpresentationcontrollerdelegate/popoverpresentationcontrollerdiddismisspopover(_:).md)
