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;Swift
var duration: TimeInterval { get set } -
Defines the
delaybefore start of the animation. The default delay is0 seconds.Declaration
Objective-C
@property (nonatomic) NSTimeInterval startDelay;Swift
var startDelay: TimeInterval { get set } -
Defines the
ISCIEasingFunctionused in calculating the elapsed fraction of the animation. TheeasingFunctiondetermines whether the animation runs with linear or non-linear motion.Note
default value isnil.Declaration
Objective-C
@property (nonatomic, strong, nullable) id<ISCIEasingFunction> easingFunction;Swift
var easingFunction: (any ISCIEasingFunction)? { get set } -
Defines the value indicating current animation progress.
Declaration
Objective-C
@property (nonatomic, readonly) double animatedFraction;Swift
var animatedFraction: Double { get } -
Defines the value indicating whether this
SCIValueAnimatoris animating or not.Declaration
Objective-C
@property (nonatomic, readonly) BOOL isAnimating;Swift
var isAnimating: Bool { get }
-
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;Swift
func 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;Swift
func start(withDuration duration: TimeInterval)Parameters
durationThe 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;Swift
func start(withDuration duration: TimeInterval, andStartDelay delay: TimeInterval)Parameters
durationThe length of the animation.
delayThe
delaybefore 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;Swift
func cancel()
-
Adds a
listenerwhich will receive notifications from an animation, such as start or end animation.Declaration
Objective-C
- (void)addListener:(nonnull id<ISCIAnimatorListener>)listener;Swift
func add(_ listener: any ISCIAnimatorListener)Parameters
listenerthe 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;Swift
func remove(_ listener: any ISCIAnimatorListener)Parameters
listenerThe listener to be removed from the current set of listeners for this animation.
-
Remove all
-addListener:from thisSCIValueAnimatorinstance.Declaration
Objective-C
- (void)removeAllListeners;Swift
func removeAllListeners()
View on GitHub