2010-05-02 27 views
0

我正在尋找良好的繪圖庫(線,餅圖,柱形圖),它允許與用戶觸摸股票應用程序類似的東西進行交互。iPhone繪圖/圖表庫

我發現了一個核心圖庫,但似乎是交互邏輯沒有很好的覆蓋。

請建議可以使用哪些庫?

回答

0

配置了問題。

交互邏輯在覈心圖庫中包含在CPLayerHostingView.m文件中。

如果您需要將您的ViewControllerCPLayerHostingView,只需添加屬性相關聯:

@interface CPLayerHostingView : UIView<CPPlotDataSource> { 
@protected 
    CPLayer *hostedLayer; 
    CPTestAppScatterPlotController *touchController; 
} 

@property (nonatomic, readwrite, retain) CPLayer *hostedLayer; 
@property (nonatomic, readwrite, retain) CPTestAppScatterPlotController *touchController; 

然後在ViewController使用代碼:

CPLayerHostingView *hostingView = (CPLayerHostingView *)self.view; 
hostingView.touchController = self; 

所以,現在你能夠從運行任何控制器的視圖的方法視圖。