开发者

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜