Я хочу создать кнопку, которая выделяет следующую точку, которая следует за текущей выделенной точкой на диаграмме рассеяния.
Должен ли я вызывать метод -(void)scatterPlot:(CPTScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)index в addTarget кнопки? Или какое может быть решение?
Я пытался сделать так, но это не работает. Я получаю эту ошибку «NSInvalidArgumentException», причина: «-[GrapicViewController 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];