Core Plot (macOS)
Cocoa plotting framework for macOS, iOS, and tvOS
CPTAnimation Class Reference

The controller for Core Plot animations. More...

#import <CPTAnimation.h>

+ Inheritance diagram for CPTAnimation:
+ Collaboration diagram for CPTAnimation:

Public Class Methods

Animation Controller Instance
(nonnull instancetype) + sharedInstance
 A shared CPTAnimation instance responsible for scheduling and executing animations. More...
 
Property Animation
(nonnull CPTAnimationOperation *) + animate:property:period:animationCurve:delegate:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
CGFloat Property Animation
(nonnull CPTAnimationOperation *) + animate:property:from:to:duration:withDelay:animationCurve:delegate:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
(nonnull CPTAnimationOperation *) + animate:property:from:to:duration:animationCurve:delegate:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
(nonnull CPTAnimationOperation *) + animate:property:from:to:duration:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
CGPoint Property Animation
(nonnull CPTAnimationOperation *) + animate:property:fromPoint:toPoint:duration:withDelay:animationCurve:delegate:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
(nonnull CPTAnimationOperation *) + animate:property:fromPoint:toPoint:duration:animationCurve:delegate:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
(nonnull CPTAnimationOperation *) + animate:property:fromPoint:toPoint:duration:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
CGSize Property Animation
(nonnull CPTAnimationOperation *) + animate:property:fromSize:toSize:duration:withDelay:animationCurve:delegate:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
(nonnull CPTAnimationOperation *) + animate:property:fromSize:toSize:duration:animationCurve:delegate:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
(nonnull CPTAnimationOperation *) + animate:property:fromSize:toSize:duration:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
CGRect Property Animation
(nonnull CPTAnimationOperation *) + animate:property:fromRect:toRect:duration:withDelay:animationCurve:delegate:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
(nonnull CPTAnimationOperation *) + animate:property:fromRect:toRect:duration:animationCurve:delegate:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
(nonnull CPTAnimationOperation *) + animate:property:fromRect:toRect:duration:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
NSDecimal Property Animation
(nonnull CPTAnimationOperation *) + animate:property:fromDecimal:toDecimal:duration:withDelay:animationCurve:delegate:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
(nonnull CPTAnimationOperation *) + animate:property:fromDecimal:toDecimal:duration:animationCurve:delegate:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
(nonnull CPTAnimationOperation *) + animate:property:fromDecimal:toDecimal:duration:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
NSNumber Property Animation
(nonnull CPTAnimationOperation *) + animate:property:fromNumber:toNumber:duration:withDelay:animationCurve:delegate:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
(nonnull CPTAnimationOperation *) + animate:property:fromNumber:toNumber:duration:animationCurve:delegate:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
(nonnull CPTAnimationOperation *) + animate:property:fromNumber:toNumber:duration:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
CPTPlotRange Property Animation
(nonnull CPTAnimationOperation *) + animate:property:fromPlotRange:toPlotRange:duration:withDelay:animationCurve:delegate:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
(nonnull CPTAnimationOperation *) + animate:property:fromPlotRange:toPlotRange:duration:animationCurve:delegate:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
(nonnull CPTAnimationOperation *) + animate:property:fromPlotRange:toPlotRange:duration:
 Creates an animation operation with the given properties and adds it to the animation queue. More...
 
- Public Class Methods inherited from NSObject
(id+ alloc
 
(Class+ class
 
(void) + initialize
 
(void) + load
 
(id+ new
 
- Public Class Methods inherited from <NSKeyValueBindingCreation>
(void) + exposeBinding:
 

Public Instance Methods

Animation Management
(nonnull CPTAnimationOperation *) - addAnimationOperation:
 Adds an animation operation to the animation queue. More...
 
(void) - removeAnimationOperation:
 Removes an animation operation from the animation queue. More...
 
(void) - removeAllAnimationOperations
 Removes all animation operations from the animation queue. More...
 
Retrieving Animation Operations
(nullable CPTAnimationOperation *) - operationWithIdentifier:
 Gets the animation operation with the given identifier from the animation operation array. More...
 
Initialization
(nonnull instancetype) - init [implementation]
 Initializes a newly allocated CPTAnimation object. More...
 
- Public Instance Methods inherited from NSObject
(Class- classForCoder
 
(id- copy
 
(void) - dealloc
 
(void) - finalize
 
(id- init
 
(id- mutableCopy
 
- Public Instance Methods inherited from <NSObject>
(NSString *) - description
 
(NSUInteger- hash
 
(BOOL- isEqual:
 
- Public Instance Methods inherited from <NSKeyValueBindingCreation>
(NSArray *) - exposedBindings
 
(Class- valueClassForBinding:
 
(void) - bind:toObject:withKeyPath:options:
 
(NSArray *) - optionDescriptionsForBinding:
 
(NSDictionary *) - infoForBinding:
 
(void) - unbind:
 

Properties

Time
CGFloat timeOffset
 The animation clock. This value is incremented for each frame while animations are running. More...
 
Animation Curve
CPTAnimationCurve defaultAnimationCurve
 The animation curve used when an animation operation specifies the CPTAnimationCurveDefault animation curve. More...
 

Detailed Description

The controller for Core Plot animations.

Many Core Plot objects are subclasses of CALayer and can take advantage of all of the animation support provided by Core Animation. However, some objects, e.g., plot spaces, cannot be animated by Core Animation. It also does not support NSDecimal properties that are common throughout Core Plot.

CPTAnimation provides animation support for all of these things. It can animate any property (of the supported data types) on objects of any class.

Method Documentation

◆ addAnimationOperation:

- (CPTAnimationOperation *) addAnimationOperation: (nonnull CPTAnimationOperation *)  animationOperation

Adds an animation operation to the animation queue.

Parameters
animationOperationThe animation operation to add.
Returns
The queued animation operation.

◆ animate:property:from:to:duration:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
from: (CGFloat from
to: (CGFloat to
duration: (CGFloat duration 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting value for the animation. If NaN, the animation starts from the current value of the animated property.
toThe ending value for the animation.
durationThe duration of the animation.
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:from:to:duration:animationCurve:delegate:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
from: (CGFloat from
to: (CGFloat to
duration: (CGFloat duration
animationCurve: (CPTAnimationCurve animationCurve
delegate: (nullable id<CPTAnimationDelegate>)  delegate 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting value for the animation. If NaN, the animation starts from the current value of the animated property.
toThe ending value for the animation.
durationThe duration of the animation.
animationCurveThe animation curve used to animate the new operation.
delegateThe animation delegate (can be nil).
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:from:to:duration:withDelay:animationCurve:delegate:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
from: (CGFloat from
to: (CGFloat to
duration: (CGFloat duration
withDelay: (CGFloat delay
animationCurve: (CPTAnimationCurve animationCurve
delegate: (nullable id<CPTAnimationDelegate>)  delegate 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting value for the animation. If NaN, the animation starts from the current value of the animated property.
toThe ending value for the animation.
durationThe duration of the animation.
delayThe starting delay of the animation in seconds.
animationCurveThe animation curve used to animate the new operation.
delegateThe animation delegate (can be nil).
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromDecimal:toDecimal:duration:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromDecimal: (NSDecimal from
toDecimal: (NSDecimal to
duration: (CGFloat duration 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting value for the animation. If NaN, the animation starts from the current value of the animated property.
toThe ending value for the animation.
durationThe duration of the animation.
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromDecimal:toDecimal:duration:animationCurve:delegate:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromDecimal: (NSDecimal from
toDecimal: (NSDecimal to
duration: (CGFloat duration
animationCurve: (CPTAnimationCurve animationCurve
delegate: (nullable id<CPTAnimationDelegate>)  delegate 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting value for the animation. If NaN, the animation starts from the current value of the animated property.
toThe ending value for the animation.
durationThe duration of the animation.
animationCurveThe animation curve used to animate the new operation.
delegateThe animation delegate (can be nil).
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromDecimal:toDecimal:duration:withDelay:animationCurve:delegate:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromDecimal: (NSDecimal from
toDecimal: (NSDecimal to
duration: (CGFloat duration
withDelay: (CGFloat delay
animationCurve: (CPTAnimationCurve animationCurve
delegate: (nullable id<CPTAnimationDelegate>)  delegate 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting value for the animation. If NaN, the animation starts from the current value of the animated property.
toThe ending value for the animation.
durationThe duration of the animation.
delayThe starting delay of the animation in seconds.
animationCurveThe animation curve used to animate the new operation.
delegateThe animation delegate (can be nil).
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromNumber:toNumber:duration:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromNumber: (nullable NSNumber *)  from
toNumber: (nonnull NSNumber *)  to
duration: (CGFloat duration 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting value. If NaN or nil, the animation starts from the current value of the animated property.
toThe ending value.
durationThe duration of the animation.
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromNumber:toNumber:duration:animationCurve:delegate:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromNumber: (nullable NSNumber *)  from
toNumber: (nonnull NSNumber *)  to
duration: (CGFloat duration
animationCurve: (CPTAnimationCurve animationCurve
delegate: (nullable id<CPTAnimationDelegate>)  delegate 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting value. If NaN or nil, the animation starts from the current value of the animated property.
toThe ending value.
durationThe duration of the animation.
animationCurveThe animation curve used to animate the new operation.
delegateThe animation delegate (can be nil).
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromNumber:toNumber:duration:withDelay:animationCurve:delegate:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromNumber: (nullable NSNumber *)  from
toNumber: (nonnull NSNumber *)  to
duration: (CGFloat duration
withDelay: (CGFloat delay
animationCurve: (CPTAnimationCurve animationCurve
delegate: (nullable id<CPTAnimationDelegate>)  delegate 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting value. If NaN or nil, the animation starts from the current value of the animated property.
toThe ending value.
durationThe duration of the animation.
delayThe starting delay of the animation in seconds.
animationCurveThe animation curve used to animate the new operation.
delegateThe animation delegate (can be nil).
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromPlotRange:toPlotRange:duration:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromPlotRange: (nonnull CPTPlotRange *)  from
toPlotRange: (nonnull CPTPlotRange *)  to
duration: (CGFloat duration 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting plot range for the animation. If nil or any component of the range is NaN, the animation starts from the current value of the animated property.
toThe ending plot range for the animation.
durationThe duration of the animation.
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromPlotRange:toPlotRange:duration:animationCurve:delegate:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromPlotRange: (nonnull CPTPlotRange *)  from
toPlotRange: (nonnull CPTPlotRange *)  to
duration: (CGFloat duration
animationCurve: (CPTAnimationCurve animationCurve
delegate: (nullable id<CPTAnimationDelegate>)  delegate 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting plot range for the animation. If nil or any component of the range is NaN, the animation starts from the current value of the animated property.
toThe ending plot range for the animation.
durationThe duration of the animation.
animationCurveThe animation curve used to animate the new operation.
delegateThe animation delegate (can be nil).
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromPlotRange:toPlotRange:duration:withDelay:animationCurve:delegate:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromPlotRange: (nonnull CPTPlotRange *)  from
toPlotRange: (nonnull CPTPlotRange *)  to
duration: (CGFloat duration
withDelay: (CGFloat delay
animationCurve: (CPTAnimationCurve animationCurve
delegate: (nullable id<CPTAnimationDelegate>)  delegate 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting plot range for the animation. If nil or any component of the range is NaN, the animation starts from the current value of the animated property.
toThe ending plot range for the animation.
durationThe duration of the animation.
delayThe starting delay of the animation in seconds.
animationCurveThe animation curve used to animate the new operation.
delegateThe animation delegate (can be nil).
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromPoint:toPoint:duration:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromPoint: (CGPoint from
toPoint: (CGPoint to
duration: (CGFloat duration 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting point for the animation. If either coordinate is NaN, the animation starts from the current value of the animated property.
toThe ending point for the animation.
durationThe duration of the animation.
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromPoint:toPoint:duration:animationCurve:delegate:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromPoint: (CGPoint from
toPoint: (CGPoint to
duration: (CGFloat duration
animationCurve: (CPTAnimationCurve animationCurve
delegate: (nullable id<CPTAnimationDelegate>)  delegate 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting point for the animation. If either coordinate is NaN, the animation starts from the current value of the animated property.
toThe ending point for the animation.
durationThe duration of the animation.
animationCurveThe animation curve used to animate the new operation.
delegateThe animation delegate (can be nil).
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromPoint:toPoint:duration:withDelay:animationCurve:delegate:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromPoint: (CGPoint from
toPoint: (CGPoint to
duration: (CGFloat duration
withDelay: (CGFloat delay
animationCurve: (CPTAnimationCurve animationCurve
delegate: (nullable id<CPTAnimationDelegate>)  delegate 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting point for the animation. If either coordinate is NaN, the animation starts from the current value of the animated property.
toThe ending point for the animation.
durationThe duration of the animation.
delayThe starting delay of the animation in seconds.
animationCurveThe animation curve used to animate the new operation.
delegateThe animation delegate (can be nil).
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromRect:toRect:duration:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromRect: (CGRect from
toRect: (CGRect to
duration: (CGFloat duration 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting rectangle for the animation. If CGRectNull or any field is NaN, the animation starts from the current value of the animated property.
toThe ending rectangle for the animation.
durationThe duration of the animation.
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromRect:toRect:duration:animationCurve:delegate:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromRect: (CGRect from
toRect: (CGRect to
duration: (CGFloat duration
animationCurve: (CPTAnimationCurve animationCurve
delegate: (nullable id<CPTAnimationDelegate>)  delegate 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting rectangle for the animation. If CGRectNull or any field is NaN, the animation starts from the current value of the animated property.
toThe ending rectangle for the animation.
durationThe duration of the animation.
animationCurveThe animation curve used to animate the new operation.
delegateThe animation delegate (can be nil).
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromRect:toRect:duration:withDelay:animationCurve:delegate:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromRect: (CGRect from
toRect: (CGRect to
duration: (CGFloat duration
withDelay: (CGFloat delay
animationCurve: (CPTAnimationCurve animationCurve
delegate: (nullable id<CPTAnimationDelegate>)  delegate 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting rectangle for the animation. If CGRectNull or any field is NaN, the animation starts from the current value of the animated property.
toThe ending rectangle for the animation.
durationThe duration of the animation.
delayThe starting delay of the animation in seconds.
animationCurveThe animation curve used to animate the new operation.
delegateThe animation delegate (can be nil).
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromSize:toSize:duration:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromSize: (CGSize from
toSize: (CGSize to
duration: (CGFloat duration 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting size for the animation. If either coordinate is NaN, the animation starts from the current value of the animated property.
toThe ending size for the animation.
durationThe duration of the animation.
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromSize:toSize:duration:animationCurve:delegate:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromSize: (CGSize from
toSize: (CGSize to
duration: (CGFloat duration
animationCurve: (CPTAnimationCurve animationCurve
delegate: (nullable id<CPTAnimationDelegate>)  delegate 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting size for the animation. If either coordinate is NaN, the animation starts from the current value of the animated property.
toThe ending size for the animation.
durationThe duration of the animation.
animationCurveThe animation curve used to animate the new operation.
delegateThe animation delegate (can be nil).
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:fromSize:toSize:duration:withDelay:animationCurve:delegate:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
fromSize: (CGSize from
toSize: (CGSize to
duration: (CGFloat duration
withDelay: (CGFloat delay
animationCurve: (CPTAnimationCurve animationCurve
delegate: (nullable id<CPTAnimationDelegate>)  delegate 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
fromThe starting size for the animation. If either coordinate is NaN, the animation starts from the current value of the animated property.
toThe ending size for the animation.
durationThe duration of the animation.
delayThe starting delay of the animation in seconds.
animationCurveThe animation curve used to animate the new operation.
delegateThe animation delegate (can be nil).
Returns
The queued animation operation.

Provided by category CPTAnimation(CPTAnimationPeriodAdditions).

◆ animate:property:period:animationCurve:delegate:

+ (nonnull CPTAnimationOperation *) animate: (nonnull id object
property: (nonnull NSString *)  property
period: (nonnull CPTAnimationPeriod *)  period
animationCurve: (CPTAnimationCurve animationCurve
delegate: (nullable id<CPTAnimationDelegate>)  delegate 

Creates an animation operation with the given properties and adds it to the animation queue.

Parameters
objectThe object to animate.
propertyThe name of the property of object to animate. The property must have both getter and setter methods.
periodThe animation period.
animationCurveThe animation curve used to animate the new operation.
delegateThe animation delegate (can be nil).
Returns
The queued animation operation.

◆ init

- (nonnull instancetype) init
implementation

Initializes a newly allocated CPTAnimation object.

This is the designated initializer. The initialized object will have the following properties:

Returns
The initialized object.

◆ operationWithIdentifier:

- (nullable CPTAnimationOperation *) operationWithIdentifier: (nullable id<NSCopying, NSObject>)  identifier

Gets the animation operation with the given identifier from the animation operation array.

Parameters
identifierAn animation operation identifier.
Returns
The animation operation with the given identifier or nil if it was not found.

◆ removeAllAnimationOperations

- (void) removeAllAnimationOperations

Removes all animation operations from the animation queue.

◆ removeAnimationOperation:

- (void) removeAnimationOperation: (nullable CPTAnimationOperation *)  animationOperation

Removes an animation operation from the animation queue.

Parameters
animationOperationThe animation operation to remove.

◆ sharedInstance

+ (nonnull instancetype) sharedInstance

A shared CPTAnimation instance responsible for scheduling and executing animations.

Returns
The shared CPTAnimation instance.

Property Documentation

◆ defaultAnimationCurve

- (CPTAnimationCurve) defaultAnimationCurve
readwritenonatomicassign

The animation curve used when an animation operation specifies the CPTAnimationCurveDefault animation curve.

◆ timeOffset

- (CGFloat) timeOffset
readnonatomicassign

The animation clock. This value is incremented for each frame while animations are running.


The documentation for this class was generated from the following files: