2011-10-20 55 views
4

我現在正在使用Core-plot開發應用程序。 我正在尋找一些觸摸事件,用戶觸摸圖表的一點, 然後它顯示的價格。iPhone CorePlot:用戶觸摸事件圖表

當我看看的CorePlot網站, 它有一個應用程序顯示什麼,我需要 http://code.google.com/p/core-plot/wiki/AppsUsingCorePlot

enter image description here

我真的想通過睿情節做這個功能, 我現在使用CorePlot 0.4 我想要做下面的函數 enter image description here

enter image description here

我真的想要一個觸摸事件,它可以顯示點用戶觸摸的指定價格。

非常感謝!

回答

1

使用手勢重新整合它爲此工作fine.in第一次輕擊你顯示價格和第二次隱藏。

7

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; 
包含核心圖顯示
6

Mac的CPTTestApp示例程序如何完成你描述的內容。在查看菜單下查看點選擇演示