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;Swift
func compare(to obj: NSObject) -> ComparisonResultReturn Value
NSOrderedAscendingif the value of aNumber is greater than the number object’s,NSOrderedSameif they’re equal, andNSOrderedDescendingif the value ofobjis less than the number object’s. -
Converts this comparable iinstalce to primitive
doublevalue.Declaration
Objective-C
- (double)toDouble;Swift
func toDouble() -> DoubleReturn Value
Unboxed primitive value of the this
ISCIComparableinstance. -
Converts this comparable instance to
NSDateDeclaration
Objective-C
- (nonnull NSDate *)toDate;Swift
func toDate() -> DateReturn Value
The converted
NSDateinstance. -
Needed to be able to cast implementors to
ISCIComparableon Xamarin.iOS side, since it’s impossible there.Declaration
Objective-C
- (nonnull id<ISCIComparable>)toComparable;Swift
func to() -> any ISCIComparable -
Checks whether this
ISCIComparableinstance is defined.Declaration
Objective-C
@property (nonatomic, readonly) BOOL isDefined;Swift
var isDefined: Bool { get }
View on GitHub