Send UIPanGesture translation to all views in array
I'm trying to move all views in my array at the same time. But it doesn't work. Only the first view I touch is moveable then.
I don't want the other views to move to the same exact spot, I just want all views in the array to move the same amount of distance and speed as开发者_开发知识库 the view being panned. How can I achieve this?
Add all your views to a common superview (if not already) and add the UIGestureRecognizer
to this common superview ;)
This will make it easier to manage for you (only one UIGestureRecognizer
) and will move all the subviews alltogether.
精彩评论