How to detect swiping left / right on the iPhone?

后端 未结 3 764
梦毁少年i
梦毁少年i 2021-02-04 07:50

Is there any easy way to detect these kinds of gestures for iPhone? I can use touchesBegan, touchesMoved, touchesEnded. But how can I implement the gestures? thz u.

3条回答
  •  无人及你
    2021-02-04 08:29

    If you're willing to target iPhone OS 3.2 or later (all iPads or updated iPhones), use the UISwipeGestureRecognizer object. It will do this trivially, which is wickedly cool.

提交回复
热议问题