开发者

How can I detect a swipe gesture? [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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜