<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIAdaptivePresentationControllerDelegate/presentationController(_:prepare:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIAdaptivePresentationControllerDelegate(im)presentationController:prepareAdaptivePresentationController:"
  },
  "title" : "presentationController(_:prepare:)"
}
-->

# presentationController(_:prepare:)

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

```
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

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.

---

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)