UIViewController.ParentViewController UIViewController.ParentViewController Property

Definition

The UIViewController that contains this UIViewController.

[get: Foundation.Export("parentViewController")]
public virtual UIKit.UIViewController ParentViewController { get; }
member this.ParentViewController : UIKit.UIViewController

Property Value

Container UIViewController that is the parent of this UIViewController.

This value can be null.

Remarks

Prior to iOS version 5.0, this property would return a presenting UIViewController if it was being presented and was not contained in another UIViewController. This is no longer the case; in such a situation, the presenting UIViewController will be available via PresentingViewController.

Applies to

See also