UIKit.UIView.Animate Method
Animates the property changes that take place in the specified action.

Syntax

[Foundation.Export("animateWithDuration:animations:")]
[ObjCRuntime.Availability(Introduced=ObjCRuntime.Platform.iOS_4_0)]
public static void Animate (double duration, [ObjCRuntime.BlockProxy(typeof(ObjCRuntime.Trampolines/NIDAction))] Action animation)

Parameters

duration
Duration in seconds for the animation.
animation
Code containing the changes that you will apply to your view.

Remarks

This uses the CurveEaseOut and TransitionNone flags for the animation.

C# Example

// Animates hiding the label by setting the alpha to zero over three seconds.
UIView.Animate (3, () => { label.Alpha = 0; });
            

Requirements

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