CoreAnimation.CAAnimation Class
Base class for animations.

See Also: CAAnimation Members

Syntax

[Foundation.Register("CAAnimation", true)]
public class CAAnimation : Foundation.NSObject, ICAMediaTiming, Foundation.INSCoding, Foundation.INSMutableCopying, IDisposable

Remarks

Layer-based animations are disabled by UIKit.UIViews except within UIKit.UIView animation blocks. Layer-based animations within such blocks ignore the blocks' duration and operate at their own specified duration, either the implicit default of 0.25 seconds or an explicit length. This is shown in the following example, in which the UIKit.UIView animation block's duration is 1.0, but in actuality, the layer-based implicit opacity animation ends in 0.25 seconds and the re-positioning runs for 10 seconds.

C# Example

UIView.AnimateAsync(1.0, () => {
	imgView.Layer.Opacity = 0.0f;

	var theAnim = CABasicAnimation.FromKeyPath("position");
	theAnim.From = NSObject.FromObject(firstPosition);
	theAnim.To =  NSObject.FromObject(secondPosition);
	theAnim.Duration = 10.0;

	imgView.Layer.AddAnimation(theAnim, "AnimateFrame");
});
          

Related content

Requirements

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