Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
为此有一个新的 API:请参阅这篇文章此处< /strong>。
There is a new API for this: Refer to this post here.
在 iOS 4.0 中有更简单的处理手势的方法,请参阅:
http://developer.apple.com/library/ios/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/GestureRecognizers/GestureRecognizers.html
There are easier ways to handle gestures in iOS 4.0 see:
请从此链接下载滑动手势代码:
https://github.com/brow/leaves/downloads
UISwipeGestureRecognizer *settingbtnpress = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(MethodName)]; settingbtnpress.delegate=self; settingbtnpress.direction = UISwipeGestureRecognizerDirectionRight; [self.view addGestureRecognizer:settingbtnpress]; [settingbtnpress release];
please download the swipe gesture code from this link:
基本上你需要重写 onTouchesBegan 和 onTouchesEnded。当它开始时,记录第一个位置,然后在最后比较最后一次触摸和第一次触摸,看看它是更低还是更高。
Basically you need to override onTouchesBegan and onTouchesEnded. When it begins, record the first position, then at the end compare the last touch to the first touch to see if it is lower or higher.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(4)
为此有一个新的 API:请参阅这篇文章此处< /strong>。
There is a new API for this: Refer to this post here.
在 iOS 4.0 中有更简单的处理手势的方法,请参阅:
http://developer.apple.com/library/ios/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/GestureRecognizers/GestureRecognizers.html
There are easier ways to handle gestures in iOS 4.0 see:
http://developer.apple.com/library/ios/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/GestureRecognizers/GestureRecognizers.html
请从此链接下载滑动手势代码:
https://github.com/brow/leaves/downloads
please download the swipe gesture code from this link:
https://github.com/brow/leaves/downloads
基本上你需要重写 onTouchesBegan 和 onTouchesEnded。当它开始时,记录第一个位置,然后在最后比较最后一次触摸和第一次触摸,看看它是更低还是更高。
Basically you need to override onTouchesBegan and onTouchesEnded. When it begins, record the first position, then at the end compare the last touch to the first touch to see if it is lower or higher.