Class: CAKeyframeAnimation
- Inherits:
-
CAPropertyAnimation
- Object
- NSObject
- CAAnimation
- CAPropertyAnimation
- CAKeyframeAnimation
Overview
CAKeyframeAnimation provides generic keyframe animation capabilities for a layer property in the render tree. You create an CAKeyframeAnimation instance using the inherited animationWithKeyPath: method, specifying the key path of the property updated in the render tree during the animation. The animation provides a series of keyframe values, either as an array or a series of points in a CGPathRef. While animating, it updates the value of the property in the render tree with values calculated using the specified interpolation calculation mode.
Instance Attribute Summary (collapse)
-
- biasValues
An array of NSNumber objects that define the position of the curve relative to a control point.
-
- calculationMode
Specifies how intermediate keyframe values are calculated by the receiver.
-
- continuityValues
An array of NSNumber objects that define the sharpness of the timing curve’s corners.
-
- keyTimes
An optional array of NSNumber objects that define the duration of each keyframe segment.
-
- path
An optional CGPathRef that provides the keyframe values for the receiver.
-
- rotationMode
Determines whether objects animating along the path rotate to match the path tangent.
-
- tensionValues
An array of NSNumber objects that define the tightness of the curve.
-
- timingFunctions
An optional array of CAMediaTimingFunction instances that defines the pacing of the each keyframe segment.
-
- values
An array of objects that provide the keyframe values for the receiver.
Attributes inherited from CAPropertyAnimation
#additive, #cumulative, #keyPath, #valueFunction
Attributes inherited from CAAnimation
#delegate, #removedOnCompletion, #timingFunction
Method Summary
Methods inherited from CAPropertyAnimation
Methods inherited from CAAnimation
animation, defaultValueForKey:, #shouldArchiveValueForKey:
Methods inherited from NSObject
#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version
Constructor Details
This class inherits a constructor from NSObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class NSObject
Instance Attribute Details
- (Array) biasValues
An array of NSNumber objects that define the position of the curve relative to a control point. This property is used only for the cubic calculation modes. Positive values move the curve before the control point while negative values move it after the control point. The first value defines the behavior of the tangent to the first control point, the second value controls the second point’s tangents, and so on. If you do not specify a value for a given control point, the value 0 is used.
- (String) calculationMode
Specifies how intermediate keyframe values are calculated by the receiver. The possible values are described in “Value calculation modes”. The default is kCAAnimationLinear.
- (Array) continuityValues
An array of NSNumber objects that define the sharpness of the timing curve’s corners. This property is used only for the cubic calculation modes. Positive values result in sharper corners while negative values create inverted corners. The first value defines the behavior of the tangent to the first control point, the second value controls the second point’s tangents, and so on. If you do not specify a value for a given control point, the value 0 is used.
- (Array) keyTimes
An optional array of NSNumber objects that define the duration of each keyframe segment. Each value in the array is a floating point number between 0.0 and 1.0 and corresponds to one element in the values array. Each element in the keyTimes array defines the duration of the corresponding keyframe value as a fraction of the total duration of the animation. Each element value must be greater than, or equal to, the previous value.The appropriate values in the keyTimes array are dependent on the calculationMode property.If the calculationMode is set to kCAAnimationLinear, the first value in the array must be 0.0 and the last value must be 1.0. Values are interpolated between the specified key times. If the calculationMode is set to kCAAnimationDiscrete, the first value in the array must be 0.0.If the calculationMode is set to kCAAnimationPaced or kCAAnimationCubicPaced, the keyTimes array is ignored.If the values in the keyTimes array are invalid or inappropriate for the calculationMode, the keyTimes array is ignored.
- (CGPathRef) path
An optional CGPathRef that provides the keyframe values for the receiver. Defaults to nil. Specifying a path overrides the values property. Each point in the path, except for move-to points, defines a single keyframe segment for the purpose of timing and interpolation. For constant velocity animation along the path, calculationMode should be set to kCAAnimationPaced.
- (String) rotationMode
Determines whether objects animating along the path rotate to match the path tangent. Possible values are described in “Rotation Mode Values”. The default is nil, which indicates that objects should not rotate to follow the path.The effect of setting this property to a non-nil value when no path object is supplied is undefined.
- (Array) tensionValues
An array of NSNumber objects that define the tightness of the curve. This property is used only for the cubic calculation modes. Positive values indicate a tighter curve while negative values indicate a rounder curve. The first value defines the behavior of the tangent to the first control point, the second value controls the second point’s tangents, and so on. If you do not specify a value for a given control point, the value 0 is used.
- (Array) timingFunctions
An optional array of CAMediaTimingFunction instances that defines the pacing of the each keyframe segment. If the receiver defines n keyframes, there must be n-1 objects in the timingFunctions array. Each timing function describes the pacing of one keyframe to keyframe segment.
- (Array) values
An array of objects that provide the keyframe values for the receiver. The values property is ignored when the path property is used.