[ios] Reenabled long tap to drop pins
Long pressing drops pins again. The minimum press duration has been extended to a second to avoid preempting the built-in gesture for draggable annotations.
This commit is contained in:
committed by
Minh Nguyễn
parent
09221ecf1a
commit
bdd2d028d9
@@ -411,7 +411,6 @@ static NSString * const MBXViewControllerAnnotationViewReuseIdentifer = @"MBXVie
|
||||
{
|
||||
if (longPress.state == UIGestureRecognizerStateBegan)
|
||||
{
|
||||
/*
|
||||
CGPoint point = [longPress locationInView:longPress.view];
|
||||
NSArray *features = [self.mapView visibleFeaturesAtPoint:point];
|
||||
NSString *title;
|
||||
@@ -428,7 +427,6 @@ static NSString * const MBXViewControllerAnnotationViewReuseIdentifer = @"MBXVie
|
||||
pin.subtitle = [[[MGLCoordinateFormatter alloc] init] stringFromCoordinate:pin.coordinate];
|
||||
// Calling `addAnnotation:` on mapView is not required since `selectAnnotation:animated` has the side effect of adding the annotation if required
|
||||
[self.mapView selectAnnotation:pin animated:YES];
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="AAd-8J-9UU" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
<pongPressGestureRecognizer allowableMovement="10" minimumPressDuration="0.5" id="lfd-mn-7en">
|
||||
<pongPressGestureRecognizer allowableMovement="10" minimumPressDuration="1" id="lfd-mn-7en">
|
||||
<connections>
|
||||
<action selector="handleLongPress:" destination="WaX-pd-UZQ" id="dkk-bc-rvl"/>
|
||||
</connections>
|
||||
|
||||
Reference in New Issue
Block a user