iOS Charting Documentation - SciChart iOS Charts SDK v3.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.
  • Gets a value indicating whether the current SCIModifierBehavior instance is enabled on the related ISCIChartModifier instance.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL isEnabled;

    Swift

    var isEnabled: Bool { get set }
  • Called when associated ISCIChartModifier instance handle touches began event.

    Declaration

    Objective-C

    - (void)onBeginUpdateAt:(CGPoint)point withIsMaster:(BOOL)isMaster;

    Swift

    func onBeginUpdate(at point: CGPoint, withIsMaster isMaster: Bool)

    Parameters

    point

    The current touch point.

    isMaster

    Indicates whether this behavior is called on the master chart.

  • Called when associated ISCIChartModifier instance handle touches moved event.

    Declaration

    Objective-C

    - (void)onUpdateAt:(CGPoint)point withIsMaster:(BOOL)isMaster;

    Swift

    func onUpdate(at point: CGPoint, withIsMaster isMaster: Bool)

    Parameters

    point

    The current touch point.

    isMaster

    Indicates whether this behavior is called on the master chart.

  • Called when associated ISCIChartModifier instance handle touches ended event.

    Declaration

    Objective-C

    - (void)onEndUpdateAt:(CGPoint)point withIsMaster:(BOOL)isMaster;

    Swift

    func onEndUpdate(at point: CGPoint, withIsMaster isMaster: Bool)

    Parameters

    point

    The current touch point.

    isMaster

    Indicates whether this behavior is called on the master chart.

  • 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 *)behavior
                toModifier:(nonnull id<ISCIChartModifierCore>)modifier
             withIsEnabled:(BOOL)isEnabled;

    Swift

    class func attach(_ behavior: SCIModifierBehavior<ISCIChartModifierCore>, 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.