3
我加入以下手勢識別的電線:UIPanGestureRecognizer得到所有觸摸
UIPanGestureRecognizer *d2 = [[UIPanGestureRecognizer alloc]
initWithTarget:self
action:@selector(ViewDragging2:)];
[d2 setMinimumNumberOfTouches:2];
[d2 setMaximumNumberOfTouches:2];
[targetView addGestureRecognizer:d2];
並獲得當事件發生時的燒製方法是:
-(void)ViewDragging2:(UIPanGestureRecognizer*)sender {
// some point
CGPoint translatedPoint = [(UIPanGestureRecognizer*)sender translationInView:targetView];
}
這讓是我一個點即使我用兩根手指觸摸,也可以觸摸。我如何檢索第一次和第二次觸摸的電源線?