How to detect circular gesture via Gesture Recognizer?

前端 未结 4 2090
隐瞒了意图╮
隐瞒了意图╮ 2020-12-09 12:25

I am trying to implement a volume-control-like round button. Currently I can detect swipes by the Gesture Recognizer. How can I detect a circular gesture (clockwise and anti

4条回答
  •  误落风尘
    2020-12-09 12:30

    Best Way would be implement Custom Gesture Recognizer. I do not know if you wish to detect a Discreet Gesture (Event Handling method would be called once the full circle has been detected) or a Continues Gesture (Event Handling method would be called every time you move your finger on a circular Path).

    Probably, the user may not draw a perfect circle, and the solution provided by @Sixten Otto would be good.

提交回复
热议问题