0
A
回答
0
配置了问题。
交互逻辑在核心图库中包含在CPLayerHostingView.m
文件中。
如果您需要将您的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;
所以,现在你能够从运行任何控制器的视图的方法视图。