Possible Duplicate:
How to detect Swipe Gesture in iPhone SDK?
How can I detect a swipe gesture within the interface of my iPhone application?
Create a
UIView
.Create a a subclass of a
UIGestureRecognizer
(sounds like you'd like to useUISwipeGestureRecognizer
).Use the
UIView
instance methodaddGestureRecognizer:
to attach your UIGestureRecognizer to theUIView
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.
精彩评论