0
votes

I want to create a button, that highlights the next point that comes after the current highlighted point in the scatterplot.

Should I call the method -(void)scatterPlot:(CPTScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)index in the addTarget of a button? Or what could be a solution?

I tried doing like this, but it isn't working. I get this error 'NSInvalidArgumentException', reason: '-[GraficViewController scatterPlot:aaplPlot:plotSymbolWasSelectedAtRecordIndex:ind:]: unrecognized selector sent to instance 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];
1

1 Answers

1
votes

on selector button listner you add the scatter highlight option use Core Plot .