
iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
SCIValueAnimator
@interface SCIValueAnimator : NSObject
This class provides a simple timing engine for running animations which calculate animated values and set them on target objects.
Note
Implemented with the DisplayLink under the hood.-
Defines the length of the animation. The default duration is
0.3 seconds
.Declaration
Objective-C
@property (nonatomic) NSTimeInterval duration;
-
Defines the
delay
before start of the animation. The default delay is0 seconds
.Declaration
Objective-C
@property (nonatomic) NSTimeInterval startDelay;
-
Defines the
ISCIEasingFunction
used in calculating the elapsed fraction of the animation. TheeasingFunction
determines whether the animation runs with linear or non-linear motion.Note
default value isnil
.Declaration
Objective-C
@property (nonatomic, strong, nullable) id<ISCIEasingFunction> easingFunction;
-
Defines the value indicating current animation progress.
Declaration
Objective-C
@property (nonatomic, readonly) double animatedFraction;
-
Defines the value indicating whether this
SCIValueAnimator
is animating or not.Declaration
Objective-C
@property (nonatomic, readonly) BOOL isAnimating;
-
Starts this animation. If the animation has a nonzero
startDelay
, the animation will start running after that delay elapses. A non-delayed animation will have its initial value set immediately, followed by calls to-[ISCIAnimatorListener onAnimationStart:]
for any listeners of this animator.Declaration
Objective-C
- (void)start;
-
Starts this animation. If the animation has a nonzero
startDelay
, the animation will start running after that delay elapses. A non-delayed animation will have its initial value set immediately, followed by calls to-[ISCIAnimatorListener onAnimationStart:]
for any listeners of this animator.Declaration
Objective-C
- (void)startWithDuration:(NSTimeInterval)duration;
Parameters
duration
The length of the animation.
-
Starts this animation. If the animation has a nonzero
startDelay
, the animation will start running after that delay elapses. A non-delayed animation will have its initial value set immediately, followed by calls to-[ISCIAnimatorListener onAnimationStart:]
for any listeners of this animator.Declaration
Objective-C
- (void)startWithDuration:(NSTimeInterval)duration andStartDelay:(NSTimeInterval)delay;
Parameters
duration
The length of the animation.
delay
The
delay
before start of the animation. -
Cancels the animation. Causes the animation to stop sending an
-[ISCIAnimatorListener onAnimationCancel:]
to all its listeners.Declaration
Objective-C
- (void)cancel;
-
Adds a
listener
which will receive notifications from an animation, such as start or end animation.Declaration
Objective-C
- (void)addListener:(nonnull id<ISCIAnimatorListener>)listener;
Parameters
listener
the listener to be added to the current set of listeners for this animation.
-
Removes a listener from the set listening to this animation.
Declaration
Objective-C
- (void)removeListener:(nonnull id<ISCIAnimatorListener>)listener;
Parameters
listener
The listener to be removed from the current set of listeners for this animation.
-
Remove all
-addListener:
from thisSCIValueAnimator
instance.Declaration
Objective-C
- (void)removeAllListeners;