我正在使用Core Plot在我的应用程序中显示图形,我希望Pinch Zooming功能可以独立缩放X和Y轴。当缩放缩放时,手势应该生成一个X-pinch-component和一个Y-pinch-component,它们应该以不同的方式缩放轴。
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上均匀地缩放我的绘图,无论用户的手指如何放置。\
答案 0 :(得分:1)
关闭托管视图上的内置捏合处理(allowPinchScaling
= NO
)并提供您自己的手势识别器以获取交互信息并计算缩放角度。