问题
I want to get the difference between two points touched simultaneously. But i am only getting one index into scatter plot by this method,
-(void)scatterPlot:(CPTScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)idx withEvent:(CPTNativeEvent *)event;
How to get two index by multitouch?
回答1:
The built-in interaction methods only support one point at a time. You can get the coordinates of the touch points, convert them to the coordinate space of the plot area layer, and use the -indexOfVisiblePointClosestToPlotAreaPoint:
method to get the index of each point from the scatter plot.
来源:https://stackoverflow.com/questions/25135829/touching-a-multiple-plotsymbol-in-core-plot-and-get-the-two-touch-plot-symbol-in