Question

I want to know if it is possible to drag/pan multiple images simultaneously using multitouch

ie: use 1 finger to drag one image while using the other finger to drag another image at the same time and i want to implement this using a UIGestureRecognizer.

If so i would like to know how should i go about this .

EDIT : The code im using for panning

CGPoint ltouch = [gestureRecognizer translationInView:self.view];
if ([gestureRecognizer state] == UIGestureRecognizerStateBegan) 
{
      self.pointOnImage = [gestureRecognizer view].center;
}
ltouch = CGPointMake(self.pointOnImage.x + ltouch.x, self.pointOnImage.y + ltouch.y);

[gestureRecognizer.view  setCenter:CGPointMake(ltouch.x, ltouch.y)];
Was it helpful?

Solution

yes this is possible you can download a zip from here this shows how to do it. it is not my created demo but found on some site

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top