I'm implementing both UILongPressGestureRecognizer
and UIPanGestureRecognizer
The UIPanGestureRecognizer
should start on a drag and the UILongPressGestureRecognizer
should start on a long press
Unfortunately when UIPanGestureRecognizer
is called with a drag also the UILongPressGestureRecognizer
is being called.
Thanks!
This UIGestureRecognizerDelegate method does exactly what I looked for:
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
See: Combining a UILongPressGestureRecognizer with a UIPanGestureRecognizer
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.