iOS Charting Documentation - SciChart iOS Charts SDK v3.x

SCISmartProperty

@interface SCISmartProperty : NSObject

Defines a smart property class which can hold any NSObject instances.

  • Creates a new instance of SCISmartProperty class.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithListener:
        (nonnull SCIPropertyChangeListener)listener;

    Swift

    init(listener: @escaping SCIPropertyChangeListener)

    Parameters

    listener

    The listener change listener for this property.

  • Creates a new instance of SCISmartProperty class.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithListener:
                                (nonnull SCIPropertyChangeListener)listener
                                defaultValue:(nullable id)defaultValue;

    Swift

    convenience init(listener: @escaping SCIPropertyChangeListener, defaultValue: Any?)

    Parameters

    listener

    The listener change listener for this property.

    defaultValue

    The default value for property.

  • Creates a new instance of SCISmartProperty class.

    Declaration

    Objective-C

    - (nonnull instancetype)
        initWithDefaultValueSource:(nonnull SCISmartProperty *)defaultValueSource
                          listener:(nonnull SCIPropertyChangeListener)listener;

    Swift

    convenience init(defaultValueSource: SCISmartProperty, listener: @escaping SCIPropertyChangeListener)

    Parameters

    defaultValueSource

    Default value provider.

    listener

    The listener change listener for this property.

  • Gets the current property value.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) id value;

    Swift

    var value: Any? { get }
  • Sets weak value for this property if it was not overridden by -setStrongValue: call.

    Declaration

    Objective-C

    - (void)setWeakValue:(nullable id)newValue;

    Swift

    func setWeakValue(_ newValue: Any?)

    Parameters

    newValue

    The new value for property.

  • Sets weak value for this property which overrides any previously set value.

    Declaration

    Objective-C

    - (void)setStrongValue:(nullable id)newValue;

    Swift

    func setStrongValue(_ newValue: Any?)

    Parameters

    newValue

    The new value for property.