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;
}
精彩评论