UIView.BeginAnimations Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| BeginAnimations(String) |
Indicates the beginning of an animation block. |
| BeginAnimations(String, IntPtr) |
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 Animate(Double, Action), Animate(Double, Action, Action), Animate(Double, Double, UIViewAnimationOptions, Action, Action) or Animate(Double, NFloat, NFloat, Double, UIViewAnimationOptions, Action, Action<Boolean>).
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 CGPoint (UIScreen.MainScreen.Bounds.Right -
_imageView.Frame.Width / 2, _imageView.Center.Y);
UIView.CommitAnimations ();
See also
- CommitAnimations()
- https://developer.xamarin.com/ios/Recipes/Animation/CoreAnimation/Animate_a_UIView_using_UIKit
Applies to
BeginAnimations(String, IntPtr)
[Foundation.Export("beginAnimations:context:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public static void BeginAnimations(string? animationID, IntPtr context);
[<Foundation.Export("beginAnimations:context:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
static member BeginAnimations : string * nativeint -> unit
Parameters
- animationID
- String
- context
-
IntPtr
nativeint
- Attributes