This method, along with UIViewController.BeginAppearanceTransition, should be used to alert child UIKit.UIViewControllers that their view or views are about to be shown or hidden. The application developer must invoke these methods and must not call UIViewController.ViewWillAppear, UIViewController.ViewDidAppear, UIViewController.ViewWillDisappear, or UIViewController.ViewDidDisappear directly.
The following code, from the “Media Notes” sample, demonstrates the use of UIViewController.BeginAppearanceTransition and UIViewController.EndAppearanceTransition. The code snippet shows the child UIKit.UIViewController being removed from the display (isAppearing is false) in an animated mirror (animated is true). The call to UIViewController.BeginAppearanceTransition occurs and then UIViewController.EndAppearanceTransition is called at the end of the specified animation.
C# Example
commentViewIsVisible = false;
commentViewController.WillMoveToParentViewController (null);
commentViewController.BeginAppearanceTransition (false, true);
UIView.Animate (0.5f, () => {
commentView.Alpha = 0.5f;
}, () => {
commentView.RemoveFromSuperview ();
commentViewController.EndAppearanceTransition ();
commentViewController.RemoveFromParentViewController ();
});