我正在寻找好的绘图库(线,饼,柱状图),它允许与用户触摸的东西,如在股票应用程序。
我找到了一个core-plot库,但似乎没有很好地涵盖交互逻辑。
请建议可以使用哪些库?
发布于 2010-05-10 22:08:52
已解决此问题。
交互逻辑包含在CPLayerHostingView.m文件的core-plot库中。
如果您需要将您的ViewController与CPLayerHostingView关联,只需添加以下属性:
@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;因此,现在您可以从视图运行任何控制器的视图方法。
https://stackoverflow.com/questions/2753041
复制相似问题