UIViewController.IsMovingToParentViewController Property


true if the current UIViewController is in the process of being added to a parent UIViewController.

[get: Foundation.Export("isMovingToParentViewController")]
public virtual bool IsMovingToParentViewController { get; }
member this.IsMovingToParentViewController : bool

Property Value


true only if called during the execution of ViewWillAppear(Boolean) or ViewDidAppear(Boolean).



The process of adding a UIViewController to a parent UIViewController is bookended by the functions ViewWillAppear(Boolean) and ViewDidAppear(Boolean). While those are executing, this property will return true, at all other times, it will return false.

Applies to

See also

  • <xref:UIKit.UIViewController.ViewDidAppear>
  • <xref:UIKit.UIViewController.ViewDidDisappear>
  • IsBeingPresented