1

我已经在我的视图控制器中CPTPlotDataSource实现了代表。CPTPlotSpaceDelegate我也设置了plotSpace.allowsUserInteraction = YESself.hostView.allowPinchScaling = YES

然而,方法

-(BOOL)plotSpace:(CPTPlotSpace *)space shouldScaleBy:(CGFloat)interactionScale aboutPoint:(CGPoint)interactionPoint,

-(BOOL)plotSpace:(CPTPlotSpace *)space shouldHandlePointingDeviceDownEvent:(id)event atPoint:(CGPoint)point,

-(CGPoint)plotSpace:(CPTPlotSpace *)space willDisplaceBy:(CGPoint)proposedDisplacementVector

-(CPTPlotRange *)plotSpace:(CPTPlotSpace *)space willChangePlotRangeTo:(CPTPlotRange *)newRange forCoordinate:(CPTCoordinate)coordinate即使绘图是可缩放的,也不会调用。

我在代码中遗漏了什么?

谢谢!

4

1 回答 1

4

我确实忘记设置我的代表:plotSpace.delegate = self;

于 2012-07-28T17:42:06.353 回答