---
title: "popoverControllerShouldDismissPopover(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uipopovercontrollerdelegate/popovercontrollershoulddismisspopover(_:)"
---

# popoverControllerShouldDismissPopover(_:)

Asks the delegate if the popover should be dismissed.

## Declaration

```swift
optional func popoverControllerShouldDismissPopover(_ popoverController: UIPopoverController) -> Bool
```

## Parameters

- `popoverController`: The popover controller to be dismissed.

## Return Value

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

## Discussion

Discussion This method is called in response to user-initiated attempts to dismiss the popover. It is not called when you dismiss the popover using the dismiss(animated:) method of the popover controller. If you do not implement this method in your delegate, the default return value is assumed to be true.

## See Also

### Managing the popover’s dismissal

- [popoverControllerDidDismissPopover(_:)](uikit/uipopovercontrollerdelegate/popovercontrollerdiddismisspopover(_:).md)
