UIKit.UIViewController.EndAppearanceTransition Method
With UIViewController.BeginAppearanceTransition, tells child UIKit.UIViewControllers that their child views have just appeared or disappeared.

Syntax

[Foundation.Export("endAppearanceTransition")]
[ObjCRuntime.Availability(Introduced=ObjCRuntime.Platform.iOS_5_0)]
public virtual void EndAppearanceTransition ()

See Also

UIViewController.EndAppearanceTransition

Remarks

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 ();
});

Related content

Requirements

Namespace: UIKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0