CAAnimation.h
#import <QuartzCore/CALayer.h>
#import <Foundation/NSObject.h>
typedef NSString * CAAnimationCalculationMode;
CAAnimationCalculationMode const kCAAnimationLinear;
CAAnimationCalculationMode const kCAAnimationDiscrete;
CAAnimationCalculationMode const kCAAnimationPaced;
CAAnimationCalculationMode const kCAAnimationCubic;
CAAnimationCalculationMode const kCAAnimationCubicPaced;
typedef NSString * CAAnimationRotationMode;
CAAnimationRotationMode const kCAAnimationRotateAuto;
CAAnimationRotationMode const kCAAnimationRotateAutoReverse;
typedef NSString * CATransitionType;
CATransitionType const kCATransitionFade;
CATransitionType const kCATransitionMoveIn;
CATransitionType const kCATransitionPush;
CATransitionType const kCATransitionReveal;
typedef NSString * CATransitionSubtype;
CATransitionSubtype const kCATransitionFromRight;
CATransitionSubtype const kCATransitionFromLeft;
CATransitionSubtype const kCATransitionFromTop;
CATransitionSubtype const kCATransitionFromBottom;
@interface CAAnimation : NSObject <NSSecureCoding, NSCopying, CAMediaTiming, CAAction>
+ (instancetype)animation;
+ (nullable id)defaultValueForKey:(NSString *)key;
- (BOOL)shouldArchiveValueForKey:(NSString *)key;
@property(nullable, strong) CAMediaTimingFunction *timingFunction;
@property(nullable, strong) id <CAAnimationDelegate> delegate;
@property(getter=isRemovedOnCompletion) BOOL removedOnCompletion;
@end
@protocol CAAnimationDelegate <NSObject>
@optional
- (void)animationDidStart:(CAAnimation *)anim;
- (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag;
@end
@interface CAPropertyAnimation : CAAnimation
+ (instancetype)animationWithKeyPath:(nullable NSString *)path;
@property(nullable, copy) NSString *keyPath;
@property(getter=isAdditive) BOOL additive;
@property(getter=isCumulative) BOOL cumulative;
@property(nullable, strong) CAValueFunction *valueFunction;
@end
@interface CABasicAnimation : CAPropertyAnimation
@property(nullable, strong) id fromValue;
@property(nullable, strong) id toValue;
@property(nullable, strong) id byValue;
@end
@interface CAKeyframeAnimation : CAPropertyAnimation
@property(nullable, copy) NSArray *values;
@property(nullable) CGPathRef path;
@property(nullable, copy) NSArray<NSNumber *> *keyTimes;
@property(nullable, copy) NSArray<CAMediaTimingFunction *> *timingFunctions;
@property(copy) CAAnimationCalculationMode calculationMode;
@property(nullable, copy) NSArray<NSNumber *> *tensionValues;
@property(nullable, copy) NSArray<NSNumber *> *continuityValues;
@property(nullable, copy) NSArray<NSNumber *> *biasValues;
@property(nullable, copy) CAAnimationRotationMode rotationMode;
@end
@interface CASpringAnimation : CABasicAnimation
@property CGFloat mass;
@property CGFloat stiffness;
@property CGFloat damping;
@property CGFloat initialVelocity;
@property(readonly) CFTimeInterval settlingDuration;
@end
@interface CATransition : CAAnimation
@property(copy) CATransitionType type;
@property(nullable, copy) CATransitionSubtype subtype;
@property float startProgress;