How to get pinch, zoom, and rotate actions of pan gestures in swift with single finger or button, for details image is attached

huangapple go评论66阅读模式
英文:

How to get pinch, zoom, and rotate actions of pan gestures in swift with single finger or button, for details image is attached

问题

手势对我来说是新的,如果问题不清楚,我很抱歉,但这是附加的图像以清楚地解释问题。

How to get pinch, zoom, and rotate actions of pan gestures in swift with single finger or button, for details image is attached

我找到了多个指南,但它们都使用至少2个手指。我想使用右下角的按钮来调整和旋转这个文本视图/标签/视图。如果有任何指南或参考链接,将不胜感激。

英文:

Pan gestures are new to me, so apologies if question is confusing but Here is the image attached for clearing the question

How to get pinch, zoom, and rotate actions of pan gestures in swift with single finger or button, for details image is attached

I got multiple guides but all are using minimum 2 fingers. I want to use bottom right button to resize and rotate this text view/Label/view
Any guide or reference link will be appreciated

答案1

得分: 1

你可以使用3种不同的手势识别,比如平移、旋转和缩放。

但经过研究,我发现,当你进行缩放时,例如放大,你会自动用手指进行微小的拖动,因此在同一时间可能触发对应手势识别的旋转事件,这可能导致许多角落问题,尤其是当存在冲突的手势识别时。

所以在我看来,最好的选择是使用单指进行平移手势识别来移动,并使用旋转和缩放手势识别来进行旋转和缩放。

英文:

you can use 3 different GR, like pan, rotate, and scale.

But after research, I've found out that, when you make for example zoom, you automatically make really small dragging with your fingers, so at the same time you can get rotation event from corresponding GR, it could make many corner issues, when you have conflicting GRs.

So as at seems to me the best option is used
pan gest with one finger for moving
and use rotation and scale gests for scale and rotate.

huangapple
  • 本文由 发表于 2023年2月16日 19:22:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/75471549.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定