2010-05-02 72 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; 

所以,现在你能够从运行任何控制器的视图的方法视图。