在核心图中触摸多个plotsymbol并获得两个触摸图符号索引 [英] Touching a multiple plotsymbol in core plot and get the two touch plot symbol index
本文介绍了在核心图中触摸多个plotsymbol并获得两个触摸图符号索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望同时触及两点之间的区别。但我只通过这种方法得到散射图的一个索引,
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?
推荐答案
内置交互方法一次只支持一个点。您可以获取触摸点的坐标,将它们转换为绘图区域图层的坐标空间,并使用 -indexOfVisiblePointClosestToPlotAreaPoint:
方法从中获取每个点的索引散点图。
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.
这篇关于在核心图中触摸多个plotsymbol并获得两个触摸图符号索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文