iOS Charting Documentation - SciChart iOS Charts SDK v3.x

ISCIComparable

@protocol ISCIComparable <NSObject>

Provides a protocol that can be compared. The ISCIComparable is used for types that have inherent orter, such as NSNumber and NSDate.

  • Returns an NSComparisonResult value that indicates whether the number object’s value is greater than, equal to, or less than a given ISCIComparable.

    Declaration

    Objective-C

    - (NSComparisonResult)compareTo:(NSObject *)obj;

    Swift

    func compare(to obj: NSObject!) -> ComparisonResult

    Return Value

    NSOrderedAscending if the value of aNumber is greater than the number object’s, NSOrderedSame if they’re equal, and NSOrderedDescending if the value of obj is less than the number object’s.

  • Converts this comparable iinstalce to primitive double value.

    Declaration

    Objective-C

    - (double)toDouble;

    Swift

    func toDouble() -> Double

    Return Value

    Unboxed primitive value of the this ISCIComparable instance.

  • Converts this comparable instance to NSDate

    Declaration

    Objective-C

    - (NSDate *)toDate;

    Swift

    func toDate() -> Date!

    Return Value

    The converted NSDate instance.

  • Needed to be able to cast implementors to ISCIComparable on Xamarin.iOS side, since it’s impossible there.

    Declaration

    Objective-C

    - (id<ISCIComparable>)toComparable;

    Swift

    func to() -> ISCIComparable!
  • Checks whether this ISCIComparable instance is defined.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isDefined;

    Swift

    var isDefined: Bool { get }