Instance Property


The frame rectangle to assign to the presented view at the end of the animations.


var frameOfPresentedViewInContainerView: CGRect { get }

Return Value

The rectangle of the presented view controller’s view, specified in the container view’s coordinate system.


The default implementation of this method returns the frame rectangle of the container view, which results in the presented view controller’s content occupying the entire presentation space. You can override this method and return a different frame rectangle as needed. For example, you might specify a smaller frame rectangle if you want some of the underlying content to show around the edges of the presented view.

UIKit calls this method multiple times during the course of a presentation, so your implementation should return the same frame rectangle each time. Do not use this method to make changes to your view hierarchy or perform other one-time tasks.

See Also

Adjusting the Size and Layout of the Presentation

var overrideTraitCollection: UITraitCollection?

Interface traits for the presented view controller, to use in place of traits from the iOS environment.

func containerViewWillLayoutSubviews()

Notifies the presentation controller that layout is about to begin on the views of the container view.

func containerViewDidLayoutSubviews()

Called to notify the presentation controller that layout ended on the views of the container view.