iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.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:(nonnull NSObject *)obj;

    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;

    Return Value

    Unboxed primitive value of the this ISCIComparable instance.

  • Converts this comparable instance to NSDate

    Declaration

    Objective-C

    - (nonnull NSDate *)toDate;

    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

    - (nonnull id<ISCIComparable>)toComparable;
  • Checks whether this ISCIComparable instance is defined.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isDefined;