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 delay before start of the animation. The default delay is 0 seconds.

    Declaration

    Objective-C

    @property (nonatomic) NSTimeInterval startDelay;

    Swift

    var startDelay: TimeInterval { get set }
  • Defines the ISCIEasingFunction used in calculating the elapsed fraction of the animation. The easingFunction determines whether the animation runs with linear or non-linear motion.

    Note

    default value is nil.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) id<ISCIEasingFunction> easingFunction;

    Swift

    var easingFunction: 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 SCIValueAnimator is 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

    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;

    Swift

    func start(withDuration duration: TimeInterval, andStartDelay delay: TimeInterval)

    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;

    Swift

    func 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;

    Swift

    func add(_ listener: ISCIAnimatorListener)

    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;

    Swift

    func remove(_ listener: ISCIAnimatorListener)

    Parameters

    listener

    The listener to be removed from the current set of listeners for this animation.

  • Remove all -addListener: from this SCIValueAnimator instance.

    Declaration

    Objective-C

    - (void)removeAllListeners;

    Swift

    func removeAllListeners()