iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x

SCIUpdateSuspender

@interface SCIUpdateSuspender : SCIDisposableBase <ISCIUpdateSuspender>

A disposable class which allows nested suspend/resume operations on an ISCISuspendable target.

  • Initializes a new instance of the SCIUpdateSuspender class.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithTarget:(nonnull id<ISCISuspendable>)target;

    Swift

    init(target: ISCISuspendable)

    Parameters

    target

    The target instance.

  • Gets a value indicating whether updates for this instance are currently suspended.

    Declaration

    Objective-C

    + (BOOL)isTargetSuspended:(nonnull id<ISCISuspendable>)target;

    Swift

    class func isTargetSuspended(_ target: ISCISuspendable) -> Bool

    Parameters

    target

    Target to check.

    Return Value

    YES if target’s updates are suspended.

  • Helper method which suspend updates on target instance while runnable is executing.

    Declaration

    Objective-C

    + (void)usingWithSuspendable:(nonnull id<ISCISuspendable>)suspendable
                       withBlock:(nonnull SCIAction)block;

    Swift

    class func usingWith(_ suspendable: ISCISuspendable, with block: @escaping SCIAction)

    Parameters

    suspendable

    The ISCISuspendable which need to suspend before running runnable.

    block

    The SCIAction to run code of changing state of target is suspended.

  • Gets a value indicating whether updates for this instance are currently suspended.

    Declaration

    Objective-C

    + (nonnull NSMapTable<id<ISCISuspendable>, NSNumber *> *)suspendedInstances;

    Swift

    class func suspendedInstances() -> NSMapTable<ISCISuspendable, NSNumber>

    Return Value

    List of suspended instances.