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
SCIModifierBehaviorinstance is enabled on the relatedISCIChartModifierinstance.Declaration
Objective-C
@property (nonatomic) BOOL isEnabled;Swift
var isEnabled: Bool { get set } -
Creates a new instance of
SCIModifierBehaviorclass.Declaration
Objective-C
- (nonnull instancetype)initWithModifierType:(nonnull Class)modifierType;Swift
init(modifierType: AnyClass)Parameters
modifierTypeType of the modifier to which this modifier will be attached.
-
Called when associated
ISCIChartModifierinstance handle touches began event.Declaration
Objective-C
- (void)onBeginUpdateWithArgs:(nonnull SCIGestureModifierEventArgs *)args;Swift
func onBeginUpdate(with args: SCIGestureModifierEventArgs)Parameters
argsThe gesture modifier event argumens.
-
Called when associated
ISCIChartModifierinstance handle touches moved event.Declaration
Objective-C
- (void)onUpdateWithArgs:(nonnull SCIGestureModifierEventArgs *)args;Swift
func onUpdate(with args: SCIGestureModifierEventArgs)Parameters
argsThe gesture modifier event argumens.
-
Called when associated
ISCIChartModifierinstance handle touches ended event.Declaration
Objective-C
- (void)onEndUpdateWithArgs:(nonnull SCIGestureModifierEventArgs *)args;Swift
func onEndUpdate(with args: SCIGestureModifierEventArgs)Parameters
argsThe gesture modifier event argumens.
-
Clears
SCIModifierBehavior.lastUpdatePointx and y toNaNvalues.Declaration
Objective-C
- (void)clear;Swift
func clear() -
Attaches the
SCIModifierBehaviorinstance to theISCIChartModifierCoreinstance 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: any ISCIChartModifierCore, withIsEnabled isEnabled: Bool)Parameters
behaviorThe
SCIModifierBehaviorinstance which will be attached to the passed inISCIChartModifierCoreinstance.modifierThe
ISCIChartModifierCoreinstance to which the passed inSCIModifierBehaviorinstance will be attached.isEnabledValue which identifies whether the
SCIModifierBehaviorinstance is enabled or not.
View on GitHub