iphone – 如何在coreplot中触及该点时获取某个点的信息?

我在核心情节的分散情节中工作.当我触摸该图中的任何绘制点时,我需要显示与该触摸点相关的一些信息.

我怎样才能做到这一点?

提前致谢.

最佳答案 这些委托方法帮助了我.

-(BOOL)plotSpace:(CPTXYPlotSpace *)space shouldHandlePointingDeviceUpEvent:(id)event atPoint:(CGPoint)point{
 NSLog(@"point.x=%lf,point.y=%lf",point.x,point.y);
 return YES;
}

-(BOOL)plotSpace:(CPTXYPlotSpace *)space shouldHandlePointingDeviceCancelledEvent:(id)event{
 //NSLog(@"point.x=%lf,point.y=%lf",point.x,point.y);
 return YES;
}

 -(BOOL)plotSpace:(CPTXYPlotSpace *)space shouldHandlePointingDeviceDownEvent:(id)event atPoint:(CGPoint)point{
 NSLog(@"point.x=%lf,point.y=%lf",point.x,point.y);
 return YES;
}

-(BOOL)plotSpace:(CPTXYPlotSpace *)space shouldHandlePointingDeviceDraggedEvent:(id)event atPoint:(CGPoint)point{
 NSLog(@"point.x=%lf,point.y=%lf",point.x,point.y);
 return YES;
}
点赞