SChartAnimationCurve Protocol Reference

Conforms to NSCopying
NSObject
Declared in SChartAnimationCurve.h
Availability Standard
Premium
Related samples

Overview

The SChartAnimationCurve protocol allows any object to act as a curve evaluator for series' animations, as defined in SChartAnimation.

Given a time point between the start and end of an animation, a curve evaluator returns a value which represents the progress of the series between its beginning and end positions. For more information on curve evaluation, see the valueAtTime: method defined in the protocol.

Objects conforming to this protocol need also to conform to the NSCopying protocol.

We have defined concrete implementations of this protocol to support common animation use cases which you might have. The concrete animation curve classes are:

Tasks

Curve Evaluation

Instance Methods

valueAtProgress:

Should return an appropriate value for the animation curve at the given progress.

- (double)valueAtProgress:(double)progress

Parameters

progress

A double between 0.f and 1.f, where 0.f is the beginning of the animation and 1.f is the end of the animation.

Discussion

The value returned represents the progress of the series between its beginning and end positions, where 0.f is the start state and 1.f is, nominally, the end state. It is valid to return a value ‘v’ where either v < 0.f or v > 1.f.

Declared In

SChartAnimationCurve.h

valueAtTime:

Should return an appropriate value for the animation curve at the given time.

- (CGFloat)valueAtTime:(CGFloat)time

Parameters

time

Time is provided as a CGFloat between 0.f and 1.f, where 0.f is the beginning of the animation and 1.f is the end of the animation. (time = elapsed time / duration)

Discussion

The value returned represents the progress of the series between its beginning and end positions, where 0.f is the start state and 1.f is, nominally, the end state. It is valid to return a value ‘v’ where either v < 0.f or v > 1.f and it not necessary to return 1.f at time 1.f.

Declared In

SChartAnimationCurve.h