iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
ISCIHitTestable
@protocol ISCIHitTestable <NSObject>
Defines the base interface for a type which can be hit-tested.
-
Translates the point relative to the other
ISCIHitTestable
element.Declaration
Objective-C
- (CGPoint)translatePoint:(CGPoint)point hitTestable:(nonnull id<ISCIHitTestable>)hitTestable;
Swift
func translate(_ point: CGPoint, hitTestable: ISCIHitTestable) -> CGPoint
Parameters
point
The point which should be transformed.
hitTestable
The other
ISCIHitTestable
to use when transforming the point.Return Value
The translated
CGPoint
. -
Checks if the point is within the bound of the current
ISCIHitTestable
element.Declaration
Objective-C
- (BOOL)isPointWithinBounds:(CGPoint)point;
Swift
func isPoint(withinBounds point: CGPoint) -> Bool
Parameters
point
The point to test.
Return Value
YES - if the point is within bounds.
-
Checks if the point specified relative to another
ISCIHitTestable
element is within the bound of the currentISCIHitTestable
element.Declaration
Objective-C
- (BOOL)isPointWithinBounds:(CGPoint)point hitTestable:(nonnull id<ISCIHitTestable>)hitTestable;
Swift
func isPoint(withinBounds point: CGPoint, hitTestable: ISCIHitTestable) -> Bool
Parameters
point
The point to test.
hitTestable
The other
ISCIHitTestable
to use when checking the point.Return Value
YES if the point is within bounds.
-
Gets the bounds of the current
ISCIHitTestable
relative to the otherISCIHitTestable
element.Declaration
Objective-C
- (CGRect)getBoundsRelativeTo:(nonnull id<ISCIHitTestable>)hitTestable;
Swift
func getBoundsRelative(to hitTestable: ISCIHitTestable) -> CGRect
Parameters
hitTestable
The other
ISCIHitTestable
to use when transforming the point.Return Value
The translated
CGRect
bounds. -
Gets the
View
instance associated with thisISCIHitTestable
element.Declaration
Objective-C
@property (nonatomic, readonly, nonnull) UIView *view;
Swift
var view: UIView { get }