问题描述
我现在使用Core-plot开发应用程序。
我正在寻找一些触摸事件,用户触摸图表的一点,
然后它显示价格。
I am now using Core-plot to develop application.I am looking for some touch event for user touch one point of the chart,then it show up the price.
当我采取看看CorePlot网站,
它有一个应用程序显示我需要
When i take a look of the CorePlot website,It has a application show what i needhttp://code.google.com/p/core-plot/wiki/AppsUsingCorePlot
我真的想通过Core-plot来做这个功能,
i现在使用CorePlot 0.4
i要执行以下函数
I really want to do this function by Core-plot,i am now using CorePlot 0.4i want to do the following function
>
我真的想有一个触摸事件,可以显示指定用户触摸的价格。
I really want to have a touch event which can show the specify price of the point user touch.
非常感谢很多!!
推荐答案
CorePlot提供了许多方法来检测用户触摸:
CorePlot provides a lot of ways to detect user touches:
对于绘图:
-(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:用户触摸事件的图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!