开发者

How can I detect a swipe gesture? [duplicate]

开发者 https://www.devze.com 2023-02-08 11:10 出处:网络
This question already has answers here: 开发者_如何学运维Closed 10 years ago. Possible Duplicate:
This question already has answers here: 开发者_如何学运维 Closed 10 years ago.

Possible Duplicate:

How to detect Swipe Gesture in iPhone SDK?

How can I detect a swipe gesture within the interface of my iPhone application?


  1. Create a UIView.

  2. Create a a subclass of a UIGestureRecognizer (sounds like you'd like to use UISwipeGestureRecognizer).

  3. Use the UIView instance method addGestureRecognizer: to attach your UIGestureRecognizer to the UIView instance.

Seriously though... you should be reading documentation and books, or watching the Apple development videos as opposed to posting on here...


Check out the UIGestureRecognizer Class Reference. Being new to the iOS SDK, Apple Developer Documents will be one of your best friends, 2nd to Google anyway.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号