0

我想创建一个按钮,突出显示散点图中当前突出显示的点之后的下一个点。

我应该在按钮的 addTarget 中调用方法 -(void)scatterPlot:(CPTScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)index 吗?或者有什么解决办法?

我试过这样做,但它不起作用。我收到此错误“NSInvalidArgumentException”,原因:“-[GraficViewController scatterPlot:aaplPlot:plotSymbolWasSelectedAtRecordIndex:ind:]:无法识别的选择器发送到实例 0x2c2e80”。

UIButton * button = [[UIButton alloc] initWithFrame:CGRectMake(100, 100, 100, 50)];
[button setImage:[UIImage imageNamed:@"grafic-info-button.png"] forState:UIControlStateNormal];
[self.view addSubview:button];
int ind = selectedIndex + 1;
[button addTarget:self action:@selector(symbolforScatterPlot:aaplPlot: recordIndex:ind:) forControlEvents:UIControlEventTouchUpInside];
4

1 回答 1

1

在选择器按钮侦听器上,您添加分散突出显示选项使用 Core Plot 。

于 2013-04-01T08:30:18.700 回答