使用 Core Plot 独立(非均匀)缩放 X 轴和 Y 轴

Pinch Zooming X and Y axes independently (Non uniformly) with Core Plot

我正在使用 Core Plot 在我的应用程序中显示图形,我希望捏合缩放功能能够独立缩放 X 轴和 Y 轴。捏合缩放时,手势应该生成一个 X 捏合分量和一个 Y 捏合分量,它们应该以不同的方式缩放轴。

If the user's two fingers are on a straight vertical line, the graph should only be scaled on the Y axis.

If the user's two fingers are on a straight horizontal line, the graph should only be scaled on the X axis.

If the user's two fingers are on a straight line between 01.30 and 07.30 on a Clock (45 degrees), the graph should be scaled equally on the X and Y axis - I hope you get the idea. 

如何实现? Core Plot 总是在 X 和 Y 上均匀地缩放我的图,无论用户的手指如何放置。\

关闭内置捏合处理(allowPinchScaling = NO 在托管视图上)并提供您自己的手势识别器以获取交互信息并计算缩放角度。