散布図で現在強調表示されているポイントの後に来る次のポイントを強調表示するボタンを作成したいと思います。
ボタンの 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];