开发者

Send UIPanGesture translation to all views in array

开发者 https://www.devze.com 2023-04-08 22:36 出处:网络
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'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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号