o Prevent double long press gesture recognizer activation
Showing
1 changed file
with
2 additions
and
0 deletions
@@ -96,6 +96,8 @@ | @@ -96,6 +96,8 @@ | ||
96 | 96 | ||
97 | - (void)handleLongPress:(UILongPressGestureRecognizer *)recognizer | 97 | - (void)handleLongPress:(UILongPressGestureRecognizer *)recognizer |
98 | { | 98 | { |
99 | + if (recognizer.state != UIGestureRecognizerStateBegan) return; | ||
100 | + | ||
99 | if ([delegate respondsToSelector:@selector(mapTiledLayerView:longPressAtPoint:)]) | 101 | if ([delegate respondsToSelector:@selector(mapTiledLayerView:longPressAtPoint:)]) |
100 | [delegate mapTiledLayerView:self longPressAtPoint:[recognizer locationInView:mapView]]; | 102 | [delegate mapTiledLayerView:self longPressAtPoint:[recognizer locationInView:mapView]]; |
101 | } | 103 | } |
-
Please register or login to post a comment