---
title: "presentationController(_:prepare:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiadaptivepresentationcontrollerdelegate/presentationcontroller(_:prepare:)"
---

# presentationController(_:prepare:)

Provides an opportunity to configure the adaptive presentation controller after an adaptivity change.

## Declaration

```swift
optional func presentationController(_ presentationController: UIPresentationController, prepare adaptivePresentationController: UIPresentationController)
```

## Parameters

- `presentationController`: The presentation controller that is managing the adaptivity change.
- `adaptivePresentationController`: The adaptive presentation controller to prepare. Configure this presentation controller’s properties as necessary before it presents.

## Discussion

Discussion The system calls this method during adaptation so the delegate can configure properties of the adaptive presentation controller before it presents. For example, the system automatically adapts a view controller that presents as a popover in standard size classes to a sheet in compact size classes. You can implement this method to customize the sheet’s properties before it presents.
