CAAnimation Class
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.
Base class for animations.
[Foundation.Register("CAAnimation", true)]
public class CAAnimation : Foundation.NSObject, CoreAnimation.ICAAction, CoreAnimation.ICAMediaTiming, Foundation.INSMutableCopying, Foundation.INSSecureCoding, IDisposable, SceneKit.ISCNAnimationProtocol
[<Foundation.Register("CAAnimation", true)>]
type CAAnimation = class
inherit NSObject
interface ICAAction
interface INativeObject
interface IDisposable
interface ICAMediaTiming
interface INSCoding
interface INSCopying
interface INSMutableCopying
interface INSSecureCoding
interface ISCNAnimationProtocol
- Inheritance
- Derived
- Attributes
- Implements
Remarks
Layer-based animations are disabled by UIViews except within 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 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.
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");
});
Constructors
| Name | Description |
|---|---|
| CAAnimation() |
Creates a new CAAnimation with default values. |
| CAAnimation(NativeHandle) |
A constructor used when creating managed representations of unmanaged objects. Called by the runtime. |
| CAAnimation(NSCoder) |
A constructor that initializes the object from the data stored in the unarchiver object. |
| CAAnimation(NSObjectFlag) |
Constructor to call on derived classes to skip initialization and merely allocate the object. |
Properties
| Name | Description |
|---|---|
| AccessibilityAttributedUserInputLabels | (Inherited from NSObject) |
| AccessibilityRespondsToUserInteraction | (Inherited from NSObject) |
| AccessibilityTextualContext | (Inherited from NSObject) |
| AccessibilityUserInputLabels | (Inherited from NSObject) |
| AnimationCubic |
Represents the value associated with the constant kCAAnimationCubic |
| AnimationCubicPaced |
Represents the value associated with the constant kCAAnimationCubicPaced |
| AnimationDiscrete |
Represents the value associated with the constant kCAAnimationDiscrete |
| AnimationEvents | |
| AnimationLinear |
Represents the value associated with the constant kCAAnimationLinear |
| AnimationPaced |
Represents the value associated with the constant kCAAnimationPaced |
| AutoReverses | |
| BeginTime | |
| Class | (Inherited from NSObject) |
| ClassHandle |
The Objective-C class handle for this class. |
| DebugDescription | (Inherited from NSObject) |
| Delegate |
An instance of the CoreAnimation.CAAnimationDelegate model class which acts as the class delegate. |
| Description | (Inherited from NSObject) |
| Duration | |
| ExposedBindings | (Inherited from NSObject) |
| FadeInDuration | |
| FadeOutDuration | |
| FillMode | |
| Handle |
Handle (pointer) to the unmanaged object representation. (Inherited from NSObject) |
| IsDirectBinding | (Inherited from NSObject) |
| IsProxy | (Inherited from NSObject) |
| PreferredFrameRateRange | |
| RemovedOnCompletion |
Whether the animation is removed from the layer on completion. |
| RepeatCount | |
| RepeatDuration | |
| RetainCount | (Inherited from NSObject) |
| RotateModeAuto |
Represents the value associated with the constant kCAAnimationRotateAuto |
| RotateModeAutoReverse |
Represents the value associated with the constant kCAAnimationRotateAutoReverse |
| Self | (Inherited from NSObject) |
| Speed | |
| Superclass | (Inherited from NSObject) |
| SuperHandle |
Handle used to represent the methods in the base class for this NSObject. (Inherited from NSObject) |
| TimeOffset | |
| TimingFunction |
The timing function used to compute the animation. |
| TransitionFade |
Represents the value associated with the constant kCATransitionFade |
| TransitionFromBottom |
Represents the value associated with the constant kCATransitionFromBottom |
| TransitionFromLeft |
Represents the value associated with the constant kCATransitionFromLeft |
| TransitionFromRight |
Represents the value associated with the constant kCATransitionFromRight |
| TransitionFromTop |
Represents the value associated with the constant kCATransitionFromTop |
| TransitionMoveIn |
Represents the value associated with the constant kCATransitionMoveIn |
| TransitionPush |
Represents the value associated with the constant kCATransitionPush |
| TransitionReveal |
Represents the value associated with the constant kCATransitionReveal |
| UsesSceneTimeBase | |
| WeakDelegate |
An object that can respond to the delegate protocol for this type |
| Zone | (Inherited from NSObject) |
Methods
Events
| Name | Description |
|---|---|
| AnimationStarted |
Event raised by the object. |
| AnimationStopped |
Event raised by the object. |