我现在正在使用 Core-plot 来开发应用程序。 我正在寻找一些触摸事件供用户触摸图表的一个点, 然后它显示价格。
当我查看 CorePlot 网站时, 它有一个应用程序显示我需要什么 http://code.google.com/p/core-plot/wiki/AppsUsingCorePlot
我真的很想通过 Core-plot 来实现这个功能, 我现在使用 CorePlot 0.4 我想做以下功能
我真的很想要一个触摸事件,它可以显示用户触摸点的指定价格。
非常感谢!!
最佳答案
CorePlot 提供了很多检测用户触摸的方法:
对于绘图:
-(void)barPlot:(CPBarPlot *)plot barWasSelectedAtRecordIndex:(NSUInteger)index;
-(void)scatterPlot:(CPScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)index;
-(void)pieChart:(CPPieChart *)plot sliceWasSelectedAtRecordIndex:(NSUInteger)index;
对于绘图空间:
@protocol CPPlotSpaceDelegate <NSObject>
-(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceDownEvent:(id)event atPoint:(CGPoint)point;
-(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceDraggedEvent:(id)event atPoint:(CGPoint)point;
-(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceUpEvent:(id)event atPoint:(CGPoint)point;
关于iPhone CorePlot : Chart with user Touch Event,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7833108/