views:

22

answers:

1

Hi.

I have four UIImageViews lined up in a row and I want to be able to move the images from left to right. Is there a way to bound the movement to the x-axis (along the image centers) i.e. moving them only left and right? Similar to moving the icons around the screens on an iPhone.

I've added a UIPanGestureRecognizer to each of the views which allows me to move them around everywhere on the screen.

Any thoughts?

A: 

Well, if you don't want movement on the y axis, don't modify the y axis. Just change the x coordindate according to the gesture recognizer's movement. What exactly is the problem?

Ole Begemann