我注意到在iOS中缺少与真正的多点触控相关的问题。我不是在谈论一个手指的触摸事件,我是在谈论三个或更多手指的触摸事件。有没有任何关于大量触摸输入的手势处理的资源或文档文章?如果没有,你们有没有在过去使用过的有效的基础方法?
(附注:我的最终目标是不使用3个手指向下滑动)。
发布于 2011-09-18 04:48:28
使用手势识别器-它们为你处理触摸处理,大多数让你指定要识别的手势的最小手指数量。在您的示例中,例如:
// -viewDidLoad
UISwipeGestureRecognizer *swipeRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swiped:)];
swipeRecognizer.direction = UISwipeGestureRecognizerDirectionDown;
swipeRecognizer.numberOfTouchesRequired = 3;
[self.view addGestureRecognizer:swipeRecognizer];
[swipeRecognizer release];…
- (void)swiped:(UISwipeGestureRecognizer *)recognizer
{
if(recognizer.state == UIGestureRecognizerStateRecognized)
{
// got a three-finger swipe
}
}https://stackoverflow.com/questions/7457594
复制相似问题