【问题标题】:Detecting circular touch iphone sdk检测圆形触摸iphone sdk
【发布时间】:2012-03-12 08:42:33
【问题描述】:

我想检测用户何时使用一根手指在 UIView 上做圆周运动

任何帮助将不胜感激

【问题讨论】:

标签: iphone sdk uigesturerecognizer uitouch


【解决方案1】:

继承你的 UIView 并实现

– touchesBegan:withEvent:
– touchesMoved:withEvent:
– touchesEnded:withEvent:
– touchesCancelled:withEvent: 

在触摸移动时,您会获得新的接触点,您可以查看这些接触点是否在圆弧上。

【讨论】:

  • 呵呵,我知道 :),我如何从我得到的点确定用户正在绕圈移动
【解决方案2】:

我知道用一堆链接回答是不好的做法。但重新发明轮子也是如此。

看看:

Recognising a circle gesture to drop an annotation, how to detect circle?

How to detect a circle motion with UIGestureRecognizer

How to detect circular gesture via Gesture Recognizer?

所有链接的问题都包括已接受的答案。

【讨论】:

  • 你应该关闭重复的问题。不要复制粘贴堆栈上的一些链接。
  • @AlexTerente:我认为有时 80% 的“重复项”列表会提供更多信息(对于 OP 和后来的其他人),并且比简单地关闭问题作为重复项有用。这些“重复”中的每一个都包含许多进一步的参考。如果他们都可以在一个元问题下加入:那么我同意
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多