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

Animation timing information and animated values. More...

#import <CPTAnimationPeriod.h>

+ Inheritance diagram for CPTAnimationPeriod:
+ Collaboration diagram for CPTAnimationPeriod:

Public Class Methods

Factory Methods
(nonnull instancetype) + periodWithStart:end:duration:withDelay:
 Creates and returns a new CPTAnimationPeriod instance initialized with the provided start and end values and duration. More...
 
(nonnull instancetype) + periodWithStartPoint:endPoint:duration:withDelay:
 Creates and returns a new CPTAnimationPeriod instance initialized with the provided start and end points and duration. More...
 
(nonnull instancetype) + periodWithStartSize:endSize:duration:withDelay:
 Creates and returns a new CPTAnimationPeriod instance initialized with the provided start and end sizes and duration. More...
 
(nonnull instancetype) + periodWithStartRect:endRect:duration:withDelay:
 Creates and returns a new CPTAnimationPeriod instance initialized with the provided start and end rectangles and duration. More...
 
(nonnull instancetype) + periodWithStartDecimal:endDecimal:duration:withDelay:
 Creates and returns a new CPTAnimationPeriod instance initialized with the provided start and end values and duration. More...
 
(nonnull instancetype) + periodWithStartNumber:endNumber:duration:withDelay:
 Creates and returns a new CPTAnimationPeriod instance initialized with the provided start and end values and duration. More...
 
(nonnull instancetype) + periodWithStartPlotRange:endPlotRange:duration:withDelay:
 Creates and returns a new CPTAnimationPeriod instance initialized with the provided start and end plot ranges and duration. More...
 
- Public Class Methods inherited from NSObject
(id+ alloc
 
(Class+ class
 
(void) + initialize
 
(void) + load
 
(id+ new
 

Public Instance Methods

(void) - setStartValueFromObject:propertyGetter: [implementation]
 Initialize the start value from the property getter. More...
 
(nonnull NSValue *) - tweenedValueForProgress: [implementation]
 Calculates a value between startValue and endValue . More...
 
(BOOL- canStartWithValueFromObject:propertyGetter: [implementation]
 Determines if the current value of the bound property is between the start and end value. More...
 
Initialization
(nonnull instancetype) - initWithStart:end:duration:withDelay:
 Initializes a newly allocated CPTAnimationPeriod object with the provided start and end values and duration. More...
 
(nonnull instancetype) - initWithStartPoint:endPoint:duration:withDelay:
 Initializes a newly allocated CPTAnimationPeriod object with the provided start and end points and duration. More...
 
(nonnull instancetype) - initWithStartSize:endSize:duration:withDelay:
 Initializes a newly allocated CPTAnimationPeriod object with the provided start and end sizes and duration. More...
 
(nonnull instancetype) - initWithStartRect:endRect:duration:withDelay:
 Initializes a newly allocated CPTAnimationPeriod object with the provided start and end rectangles and duration. More...
 
(nonnull instancetype) - initWithStartDecimal:endDecimal:duration:withDelay:
 Initializes a newly allocated CPTAnimationPeriod object with the provided start and end values and duration. More...
 
(nonnull instancetype) - initWithStartNumber:endNumber:duration:withDelay:
 Initializes a newly allocated CPTAnimationPeriod object with the provided start and end values and duration. More...
 
(nonnull instancetype) - initWithStartPlotRange:endPlotRange:duration:withDelay:
 Initializes a newly allocated CPTAnimationPeriod object with the provided start and end plot ranges and duration. 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:
 

Properties

Timing Values
NSValuestartValue
 The starting value of the animation. More...
 
NSValueendValue
 The ending value of the animation. More...
 
Class valueClass
 The Objective-C class of the animated object. If nil, the value is a scalar or struct wrapped in an NSValue object. More...
 
CGFloat duration
 The duration of the animation, in seconds. More...
 
CGFloat delay
 The delay in seconds between the startOffset and the time the animation will start. If NaN, the animation will not start until the current value of the bound property is between startValue and endValue. More...
 
CGFloat startOffset
 The animation time clock offset when the receiver was created. More...
 

Detailed Description

Animation timing information and animated values.

The starting and ending values of the animation can be any of the following types wrapped in an NSValue instance:

Method Documentation

◆ canStartWithValueFromObject:propertyGetter:

- (BOOL) canStartWithValueFromObject: (nonnull id __unused)  boundObject
propertyGetter: (nonnull SEL __unused)  boundGetter 
implementation

Determines if the current value of the bound property is between the start and end value.

Parameters
boundObjectThe object to update for each animation frame.
boundGetterThe getter method for the property to update.
Returns
YES if the current value of the bound property is between the start and end value.

Provided by category CPTAnimationPeriod(AbstractMethods).

◆ initWithStart:end:duration:withDelay:

- (nonnull instancetype) initWithStart: (CGFloat aStart
end: (CGFloat anEnd
duration: (CGFloat aDuration
withDelay: (CGFloat aDelay 

Initializes a newly allocated CPTAnimationPeriod object with the provided start and end values and duration.

Parameters
aStartThe starting value. If NaN, the animation starts from the current value of the animated property.
anEndThe ending value.
aDurationThe animation duration in seconds.
aDelayThe starting delay in seconds.
Returns
The initialized object.

◆ initWithStartDecimal:endDecimal:duration:withDelay:

- (nonnull instancetype) initWithStartDecimal: (NSDecimal aStartDecimal
endDecimal: (NSDecimal anEndDecimal
duration: (CGFloat aDuration
withDelay: (CGFloat aDelay 

Initializes a newly allocated CPTAnimationPeriod object with the provided start and end values and duration.

Parameters
aStartDecimalThe starting value. If NaN, the animation starts from the current value of the animated property.
anEndDecimalThe ending value.
aDurationThe animation duration in seconds.
aDelayThe starting delay in seconds.
Returns
The initialized object.

◆ initWithStartNumber:endNumber:duration:withDelay:

- (nonnull instancetype) initWithStartNumber: (nullable NSNumber *)  aStartNumber
endNumber: (nonnull NSNumber *)  anEndNumber
duration: (CGFloat aDuration
withDelay: (CGFloat aDelay 

Initializes a newly allocated CPTAnimationPeriod object with the provided start and end values and duration.

Parameters
aStartNumberThe starting value. If NaN or nil, the animation starts from the current value of the animated property.
anEndNumberThe ending value.
aDurationThe animation duration in seconds.
aDelayThe starting delay in seconds.
Returns
The initialized object.

◆ initWithStartPlotRange:endPlotRange:duration:withDelay:

- (nonnull instancetype) initWithStartPlotRange: (nonnull CPTPlotRange *)  aStartPlotRange
endPlotRange: (nonnull CPTPlotRange *)  anEndPlotRange
duration: (CGFloat aDuration
withDelay: (CGFloat aDelay 

Initializes a newly allocated CPTAnimationPeriod object with the provided start and end plot ranges and duration.

Parameters
aStartPlotRangeThe starting plot range. If nil or any component of the range is NaN, the animation starts from the current value of the animated property.
anEndPlotRangeThe ending plot range.
aDurationThe animation duration in seconds.
aDelayThe starting delay in seconds.
Returns
The initialized object.

◆ initWithStartPoint:endPoint:duration:withDelay:

- (nonnull instancetype) initWithStartPoint: (CGPoint aStartPoint
endPoint: (CGPoint anEndPoint
duration: (CGFloat aDuration
withDelay: (CGFloat aDelay 

Initializes a newly allocated CPTAnimationPeriod object with the provided start and end points and duration.

Parameters
aStartPointThe starting point. If either coordinate is NaN, the animation starts from the current value of the animated property.
anEndPointThe ending point.
aDurationThe animation duration in seconds.
aDelayThe starting delay in seconds.
Returns
The initialized object.

◆ initWithStartRect:endRect:duration:withDelay:

- (nonnull instancetype) initWithStartRect: (CGRect aStartRect
endRect: (CGRect anEndRect
duration: (CGFloat aDuration
withDelay: (CGFloat aDelay 

Initializes a newly allocated CPTAnimationPeriod object with the provided start and end rectangles and duration.

Parameters
aStartRectThe starting rectangle. If CGRectNull or any field is NaN, the animation starts from the current value of the animated property.
anEndRectThe ending rectangle.
aDurationThe animation duration in seconds.
aDelayThe starting delay in seconds.
Returns
The initialized object.

◆ initWithStartSize:endSize:duration:withDelay:

- (nonnull instancetype) initWithStartSize: (CGSize aStartSize
endSize: (CGSize anEndSize
duration: (CGFloat aDuration
withDelay: (CGFloat aDelay 

Initializes a newly allocated CPTAnimationPeriod object with the provided start and end sizes and duration.

Parameters
aStartSizeThe starting size. If either coordinate is NaN, the animation starts from the current value of the animated property.
anEndSizeThe ending size.
aDurationThe animation duration in seconds.
aDelayThe starting delay in seconds.
Returns
The initialized object.

◆ periodWithStart:end:duration:withDelay:

+ (nonnull instancetype) periodWithStart: (CGFloat aStart
end: (CGFloat anEnd
duration: (CGFloat aDuration
withDelay: (CGFloat aDelay 

Creates and returns a new CPTAnimationPeriod instance initialized with the provided start and end values and duration.

Parameters
aStartThe starting value. If NaN, the animation starts from the current value of the animated property.
anEndThe ending value.
aDurationThe animation duration in seconds.
aDelayThe starting delay in seconds.
Returns
The initialized object.

◆ periodWithStartDecimal:endDecimal:duration:withDelay:

+ (nonnull instancetype) periodWithStartDecimal: (NSDecimal aStartDecimal
endDecimal: (NSDecimal anEndDecimal
duration: (CGFloat aDuration
withDelay: (CGFloat aDelay 

Creates and returns a new CPTAnimationPeriod instance initialized with the provided start and end values and duration.

Parameters
aStartDecimalThe starting value. If NaN, the animation starts from the current value of the animated property.
anEndDecimalThe ending value.
aDurationThe animation duration in seconds.
aDelayThe starting delay in seconds.
Returns
The initialized object.

◆ periodWithStartNumber:endNumber:duration:withDelay:

+ (nonnull instancetype) periodWithStartNumber: (nullable NSNumber *)  aStartNumber
endNumber: (nonnull NSNumber *)  anEndNumber
duration: (CGFloat aDuration
withDelay: (CGFloat aDelay 

Creates and returns a new CPTAnimationPeriod instance initialized with the provided start and end values and duration.

Parameters
aStartNumberThe starting value. If NaN or nil, the animation starts from the current value of the animated property.
anEndNumberThe ending value.
aDurationThe animation duration in seconds.
aDelayThe starting delay in seconds.
Returns
The initialized object.

◆ periodWithStartPlotRange:endPlotRange:duration:withDelay:

+ (nonnull instancetype) periodWithStartPlotRange: (nonnull CPTPlotRange *)  aStartPlotRange
endPlotRange: (nonnull CPTPlotRange *)  anEndPlotRange
duration: (CGFloat aDuration
withDelay: (CGFloat aDelay 

Creates and returns a new CPTAnimationPeriod instance initialized with the provided start and end plot ranges and duration.

Parameters
aStartPlotRangeThe starting plot range. If nil or any component of the range is NaN, the animation starts from the current value of the animated property.
anEndPlotRangeThe ending plot range.
aDurationThe animation duration in seconds.
aDelayThe starting delay in seconds.
Returns
The initialized object.

◆ periodWithStartPoint:endPoint:duration:withDelay:

+ (nonnull instancetype) periodWithStartPoint: (CGPoint aStartPoint
endPoint: (CGPoint anEndPoint
duration: (CGFloat aDuration
withDelay: (CGFloat aDelay 

Creates and returns a new CPTAnimationPeriod instance initialized with the provided start and end points and duration.

Parameters
aStartPointThe starting point. If either coordinate is NaN, the animation starts from the current value of the animated property.
anEndPointThe ending point.
aDurationThe animation duration in seconds.
aDelayThe starting delay in seconds.
Returns
The initialized object.

◆ periodWithStartRect:endRect:duration:withDelay:

+ (nonnull instancetype) periodWithStartRect: (CGRect aStartRect
endRect: (CGRect anEndRect
duration: (CGFloat aDuration
withDelay: (CGFloat aDelay 

Creates and returns a new CPTAnimationPeriod instance initialized with the provided start and end rectangles and duration.

Parameters
aStartRectThe starting rectangle. If CGRectNull or any field is NaN, the animation starts from the current value of the animated property.
anEndRectThe ending rectangle.
aDurationThe animation duration in seconds.
aDelayThe starting delay in seconds.
Returns
The initialized object.

◆ periodWithStartSize:endSize:duration:withDelay:

+ (nonnull instancetype) periodWithStartSize: (CGSize aStartSize
endSize: (CGSize anEndSize
duration: (CGFloat aDuration
withDelay: (CGFloat aDelay 

Creates and returns a new CPTAnimationPeriod instance initialized with the provided start and end sizes and duration.

Parameters
aStartSizeThe starting size. If either coordinate is NaN, the animation starts from the current value of the animated property.
anEndSizeThe ending size.
aDurationThe animation duration in seconds.
aDelayThe starting delay in seconds.
Returns
The initialized object.

◆ setStartValueFromObject:propertyGetter:

- (void) setStartValueFromObject: (nonnull id __unused)  boundObject
propertyGetter: (nonnull SEL __unused)  boundGetter 
implementation

Initialize the start value from the property getter.

Parameters
boundObjectThe object to update for each animation frame.
boundGetterThe getter method for the property to update.

Provided by category CPTAnimationPeriod(AbstractMethods).

◆ tweenedValueForProgress:

- (nonnull NSValue *) tweenedValueForProgress: (CGFloat __unused)  progress
implementation

Calculates a value between startValue and endValue .

A progress value of zero (0) returns the startValue and a value of one (1) returns the endValue .

Parameters
progressThe fraction of the animation progress.
Returns
The computed value.

Provided by category CPTAnimationPeriod(AbstractMethods).

Property Documentation

◆ delay

- (CGFloat) delay
readwritenonatomicassign

The delay in seconds between the startOffset and the time the animation will start. If NaN, the animation will not start until the current value of the bound property is between startValue and endValue.

◆ duration

- (CGFloat) duration
readwritenonatomicassign

The duration of the animation, in seconds.

◆ endValue

- (nullable NSValue *) endValue
readwritenonatomiccopy

The ending value of the animation.

◆ startOffset

- (CGFloat) startOffset
readnonatomicassign

The animation time clock offset when the receiver was created.

◆ startValue

- (nullable NSValue *) startValue
readwritenonatomiccopy

The starting value of the animation.

If nil or the encoded value is NaN, the animation starts from the current value of the animated property.

◆ valueClass

- (Class) valueClass
readnonatomicassign

The Objective-C class of the animated object. If nil, the value is a scalar or struct wrapped in an NSValue object.


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