Ios 从CPTSatterPlot委托中选择了绘图符号

Ios 从CPTSatterPlot委托中选择了绘图符号,ios,Ios,如何连接绘图SYMBOL从CPTSatterPlot委托方法中选择TrecordIndex。当我点击散点图的索引时,它不会呈现给该方法。为什么?你能帮帮我吗?谢谢你,一定要先采用协议。因此,在您的.h文件中声明如下: #import "CorePlot-CocoaTouch.h" // CPTPlotSpaceDelegate is optional, used for other things, and of course CPTPlotDataSource is mandatory, and

如何连接绘图SYMBOL从CPTSatterPlot委托方法中选择TrecordIndex。当我点击散点图的索引时,它不会呈现给该方法。为什么?你能帮帮我吗?谢谢你,一定要先采用协议。因此,在您的
.h
文件中声明如下:

#import "CorePlot-CocoaTouch.h"
// CPTPlotSpaceDelegate is optional, used for other things, and of course CPTPlotDataSource is mandatory, and for your purpose, CPTScatterPlotDelegate is also mandatory
@interface ViewController : UIViewController <CPTPlotSpaceDelegate, CPTPlotDataSource, CPTScatterPlotDelegate> { 

}

如何添加delegate方法?我使用了cptspatterplotdelegate*delegateObj=[cptspatterplotdelegate alloc]init];和delegateObj.delegate=self;和delegateObj.PlotSymbolMarginInforHitDetection=10.0f;但不起作用我已经在view didLoad方法中添加了这些代码
self.linePlot = [[CPTScatterPlot alloc] init];
self.linePlot.delegate = self;

-(void)scatterPlot:(CPTScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)index {
    // Your logic here
}