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

SCIModifierBehavior

@interface SCIModifierBehavior<__covariant T : id <ISCIChartModifierCore>>
    : NSObject <ISCIAttachable, ISCIThemeable>

Defines a base class with behavior for ISCIChartModifierCore implementors.

Note

T is the type of modifier to which this behavior will be attached.

Warning

Designed to be an abstract class, hence should be used for inheritance only. No direct initializations.
  • Gets a value indicating whether the current SCIModifierBehavior instance is enabled on the related ISCIChartModifier instance.

    Declaration

    Objective-C

    @property (nonatomic) BOOL isEnabled;

    Swift

    var isEnabled: Bool { get set }
  • Creates a new instance of SCIModifierBehavior class.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithModifierType:(nonnull Class)modifierType;

    Swift

    init(modifierType: AnyClass)

    Parameters

    modifierType

    Type of the modifier to which this modifier will be attached.

  • Called when associated ISCIChartModifier instance handle touches began event.

    Declaration

    Objective-C

    - (void)onBeginUpdateWithArgs:(nonnull SCIGestureModifierEventArgs *)args;

    Swift

    func onBeginUpdate(with args: SCIGestureModifierEventArgs)

    Parameters

    args

    The gesture modifier event argumens.

  • Called when associated ISCIChartModifier instance handle touches moved event.

    Declaration

    Objective-C

    - (void)onUpdateWithArgs:(nonnull SCIGestureModifierEventArgs *)args;

    Swift

    func onUpdate(with args: SCIGestureModifierEventArgs)

    Parameters

    args

    The gesture modifier event argumens.

  • Called when associated ISCIChartModifier instance handle touches ended event.

    Declaration

    Objective-C

    - (void)onEndUpdateWithArgs:(nonnull SCIGestureModifierEventArgs *)args;

    Swift

    func onEndUpdate(with args: SCIGestureModifierEventArgs)

    Parameters

    args

    The gesture modifier event argumens.

  • Clears SCIModifierBehavior.lastUpdatePoint x and y to NaN values.

    Declaration

    Objective-C

    - (void)clear;

    Swift

    func clear()
  • Attaches the SCIModifierBehavior instance to the ISCIChartModifierCore instance with isEnabled value passed in.

    Declaration

    Objective-C

    + (void)attachBehavior:(nonnull SCIModifierBehavior<T> *)behavior
                toModifier:(nonnull id<ISCIChartModifierCore>)modifier
             withIsEnabled:(BOOL)isEnabled;

    Swift

    class func attach(_ behavior: SCIModifierBehavior<T>, toModifier modifier: ISCIChartModifierCore, withIsEnabled isEnabled: Bool)

    Parameters

    behavior

    The SCIModifierBehavior instance which will be attached to the passed in ISCIChartModifierCore instance.

    modifier

    The ISCIChartModifierCore instance to which the passed in SCIModifierBehavior instance will be attached.

    isEnabled

    Value which identifies whether the SCIModifierBehavior instance is enabled or not.