Protocol

UIAdaptivePresentationControllerDelegate

A set of methods that, in conjunction with a presentation controller, determine how to respond to trait changes in your app.

Overview

After implementing an object that conforms to this protocol, assign that object to the delegate property of an appropriate UIPresentationController object. Your delegate can suggest a new presentation style or an entirely new view controller for displaying content. For more information about using the delegate to respond to size class changes, see UIPresentationController.

Topics

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.

Relationships

Inherits From

See Also

Device Environment

Responding to Changing Display Modes on Apple TV

Change images and resources dynamically when the screen gamut on your device changes.

class UIDevice

A representation of the current device.

class UITraitCollection

The iOS interface environment for your app, defined by traits such as horizontal and vertical size class, display scale, and user interface idiom.

protocol UITraitEnvironment

A collection of methods that makes the iOS interface environment available to your app.