swipeGesture、touchMoved 被同时调用吗?
我想在 SwipeGesture 和 TouchMoved 中执行不同的操作。但是两者都被称为 当我们刷卡时。有什么帮助吗?
Drecoginizer = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(handleSwipeFromD:)];
Drecoginizer.direction = UISwipeGestureRecognizerDirectionDown;
[self.view addGestureRecognizer:Drecoginizer];
i want to do different operation in SwipeGesture and TouchMoved.But both are called
when we swipe.any help please?
Drecoginizer = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(handleSwipeFromD:)];
Drecoginizer.direction = UISwipeGestureRecognizerDirectionDown;
[self.view addGestureRecognizer:Drecoginizer];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我了解,如果此滑动位于圆圈之外,您不希望选择器对滑动手势做出反应。在这种情况下,在滑动选择器的开头,您应该检查滑动是否在圆圈上方,如下所示:
希望它对您有帮助
As I understood you do not want the selector to react on swipe gesture if this swipe is outside of the circle. In this case, in the beginning of the swipe selector you should check if the swipe is over the circle something like so:
Hope it helps you