presentationController(_:willPresentWithAdaptiveStyle:transitionCoordinator:)
Notifies the delegate that an adaptivity-related transition is about to occur.
Declaration
optional func presentationController(_ presentationController: UIPresentationController, willPresentWithAdaptiveStyle style: UIModalPresentationStyle, transitionCoordinator: (any UIViewControllerTransitionCoordinator)?)Parameters
- presentationController:
The presentation controller that is managing the adaptivity change.
- style:
The new presentation style. If the presentation style is not changing, this parameter is set to None.
- transitionCoordinator:
The transition coordinator that is managing the transition.
Discussion
When a size class change occurs, UIKit calls this method to let you know how the presentation controller will adapt. Use this method to make any additional changes. For example, you might use the transition coordinator object to create additional animations for the transition.