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

# prepareForPopoverPresentation(_:)

Notifies the delegate that the popover is about to be presented.

## Declaration

```swift
optional func prepareForPopoverPresentation(_ popoverPresentationController: UIPopoverPresentationController)
```

## Parameters

- `popoverPresentationController`: The popover presentation controller that is about to display the popover.

## Discussion

Discussion Use this method to perform any last minute customizations of the popover appearance and behavior. At the time this method is called, the popover is not yet on the screen. You can use this method to modify the configuration of the popover presentation controller or perform any other actions that your app requires.

## See Also

### Presenting and dismissing the popover

- [popoverPresentationControllerShouldDismissPopover(_:)](uikit/uipopoverpresentationcontrollerdelegate/popoverpresentationcontrollershoulddismisspopover(_:).md)
- [popoverPresentationControllerDidDismissPopover(_:)](uikit/uipopoverpresentationcontrollerdelegate/popoverpresentationcontrollerdiddismisspopover(_:).md)
