开发者

How to use two gestureRecognizers simultaniously

Within my view I've got several images. All of those images are linked to a LongPressGestureRecognizer and a PanGestureRecognizer.

When a user Press and holds (LongPressGesture) the image animates (wigg开发者_JS百科les). When the users drags the image ,after the LongPressGesture takes in place, the animation pauzes. When the user stops dragging the animation continues.

Is there a way to use two gestureRecognizers simultaniously so that my animation doesn't pauzes when a user drags the image?

Help is greatly appreciated!


Use this methods : - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer;


- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
return YES;
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜