UIKit.UIView.CommitAnimations Method
Indicates the end of an animation block.

Syntax

[Foundation.Export("commitAnimations")]
public static void CommitAnimations ()

See Also

UIView.BeginAnimations

Remarks

Application developers should prefer to use the more compact syntax of the UIView.Animate method.

Older versions of iOS used a matched set of UIView.BeginAnimations and UIView.CommitAnimations to specify an animation block. The following code, taken from the "Animate a UIView using UIKit" recipe, shows the technique:

C# Example

  UIView.BeginAnimations ("slideAnimation");
  
  UIView.SetAnimationDuration (2);
  UIView.SetAnimationCurve (UIViewAnimationCurve.EaseInOut);
  UIView.SetAnimationRepeatCount (2);
  UIView.SetAnimationRepeatAutoreverses (true);
  UIView.SetAnimationDelegate (this);
  UIView.SetAnimationDidStopSelector (
    new Selector ("slideAnimationFinished:"));
  _imageView.Center = new PointF (UIScreen.MainScreen.Bounds.Right -
    _imageView.Frame.Width / 2, _imageView.Center.Y);
  UIView.CommitAnimations ();
              

Related content

Requirements

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