Instance Property


The presentation controller that’s managing the current view controller.


var presentationController: UIPresentationController? { get }


If the view controller is managed by a presentation controller, this property contains that object. This property is nil if the view controller isn’t managed by a presentation controller.

If you’ve not yet presented the current view controller, accessing this property creates a presentation controller based on the current value in the modalPresentationStyle property. Always set the value of that property before accessing any presentation controllers.

See Also

Adding a Custom Transition or Presentation

var transitioningDelegate: UIViewControllerTransitioningDelegate?

The delegate object that provides transition animator, interactive controller, and custom presentation controller objects.

var transitionCoordinator: UIViewControllerTransitionCoordinator?

Returns the active transition coordinator object.

func targetViewController(forAction: Selector, sender: Any?) -> UIViewController?

Returns the view controller that responds to the action.

var popoverPresentationController: UIPopoverPresentationController?

The nearest popover presentation controller that is managing the current view controller.

var restoresFocusAfterTransition: Bool

A Boolean value that indicates whether an item that previously was focused should again become focused when the item's view controller becomes visible and focusable.