缩放绘图后我需要更改数据源,我可以在缩放完成后以某种方式截取吗?
我设置了allowUserInteraction=YES,所以我可以平移和缩放,但我找不到处理这个事件的方法。
您可以使用绘图空间委托观看绘图范围。当范围满足您设置的任何阈值时,更改数据源。
这些是正确的方法:
- (BOOL) plotSpace:(CPTPlotSpace *)space shouldHandlePointingDeviceDraggedEvent:(id)event atPoint:(CGPoint)point
- (BOOL) plotSpace:(CPTPlotSpace *)space shouldHandlePointingDeviceDownEvent:(id)event atPoint:(CGPoint)point
- (BOOL) plotSpace:(CPTPlotSpace *)space shouldHandlePointingDeviceUpEvent:(id)event atPoint:(CGPoint)point {
- (BOOL) plotSpace:(CPTPlotSpace *)space shouldScaleBy:(CGFloat)interactionScale aboutPoint:(CGPoint)interactionPoint