How do observe touch events in core plot on ios?
I开发者_如何学Go added this code to my graphViewController:
-(BOOL)pointingDeviceDownEvent:(id)event atPoint:(CGPoint)interactionPoint {
NSLog(@"Touched.");
}
but it is not firing on touch. What am I doing wrong?
i'm using the CPPlotSpaceDelegate protocol to receive touches on ios.
after setting the delegate for your defaultPlotSpace you'll get called on the following methods when touches are received
-(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceUpEvent:(id)event atPoint:(CGPoint)point;
-(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceCancelledEvent:(id)event;
-(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceDownEvent:(id)event atPoint:(CGPoint)point;
-(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceDraggedEvent:(id)event atPoint:(CGPoint)point;
精彩评论