Edytuj

Udostępnij za pośrednictwem


UIView.BeginAnimations Method

Definition

Overloads

BeginAnimations(String)

Indicates the beginning of an animation block.

BeginAnimations(String, IntPtr)

Indicates the beginning of an animation block

BeginAnimations(String)

Indicates the beginning of an animation block.

public static void BeginAnimations (string animation);
static member BeginAnimations : string -> unit

Parameters

animation
String

The animation identifier.

Remarks

Application developers should prefer to use the more compact syntax of the M:UIKit.UIView.Animate* method.

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

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

See also

Applies to

BeginAnimations(String, IntPtr)

Indicates the beginning of an animation block

[Foundation.Export("beginAnimations:context:")]
public static void BeginAnimations (string animationID, IntPtr context);
static member BeginAnimations : string * nativeint -> unit

Parameters

animationID
String

The animation identifier.

This parameter can be null.

context
IntPtr

nativeint

A handle to custom data that provides context for the animation.

Attributes

Remarks

The use of this method is discouraged. Application developers should prefer to use the UIViewPropertyAnimator class to animate UIViews.

If no native data is being used for context, application developers should specify context as F:System.IntPtr.Zero.

Applies to