An object that conforms to the UIAdaptivePresentationControllerDelegate protocol works with a presentation controller to determine how to respond to trait changes in your app. Your delegate can suggest a new presentation style or an entirely new view controller for displaying content.


After implementing an object that conforms to this protocol, assign that object to the delegate property of an appropriate UIPresentationController object. For more information about using the delegate to respond to size class changes, see UIPresentationController.


Adapting the Presentation Style

func adaptivePresentationStyle(for: UIPresentationController, traitCollection: UITraitCollection)

Asks the delegate for the presentation style to use when the specified set of traits are active.

func adaptivePresentationStyle(for: UIPresentationController)

Asks the delegate for the new presentation style to use.

Adapting the View Controller

func presentationController(UIPresentationController, viewControllerForAdaptivePresentationStyle: UIModalPresentationStyle)

Asks the delegate for the view controller to display when adapting to the specified presentation style.


Inherits From