I added the following gesture recognizer:
UIPanGestureRecognizer *d2 = [[UIPanGestureRecognizer alloc]
initWithTarget:self
action:@selector(ViewDragging2:)];
[d2 setMinimumNumberOfTouches:2];
[d2 setMaximumNumberOfTouches:2];
[targetView addGestureRecognizer:d2];
and the method that runs when this event occurs is as follows:
-(void)ViewDragging2:(UIPanGestureRecognizer*)sender {
CGPoint translatedPoint = [(UIPanGestureRecognizer*)sender translationInView:targetView];
}
which give me one touch, although I touch with two fingers. How can I get the first and second touch cords?
source
share