try using the UIPanGentureRecognizersample code:
UIPanGestureRecognizer *imageGesture = [[UIPanGestureRecognizer alloc]
initWithTarget:self
action:@selector(imageDragged:)];
[imageView1 addGestureRecognizer:imageGesture];
then
- (void)imageDragged:(UIPanGestureRecognizer *)gesture{
UIImageView *imageView = (UIImageView *)gesture.view;
CGPoint translation = [gesture translationInView:imageView];
imageView.center = CGPointMake(imageView.center.x + translation.x,
imageView.center.y + translation.y);
imageView2.center = imageView.center;
imageView3.center = imageView.center;
[gesture setTranslation:CGPointZero inView:imageView];}
source
share