[ios] Enable one-finger quickzoom gesture on iPad
This commit is contained in:
@@ -49,6 +49,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
|
||||
* Fixed an issue where translucent, non-view-backed point annotations along tile boundaries would be drawn darker than expected. ([#6832](https://github.com/mapbox/mapbox-gl-native/pull/6832))
|
||||
* Double-tap and two-finger tap gestures now zoom to the nearest integer zoom level. ([#8027](https://github.com/mapbox/mapbox-gl-native/pull/8027))
|
||||
* The `MGLAnnotationView.annotation` property is now read-write. ([#8139](https://github.com/mapbox/mapbox-gl-native/pull/8139))
|
||||
* Enabled the one-finger zoom gesture on iPad. To execute this gesture, tap twice; on second tap, hold your finger on the map and pan up to zoom in, or down to zoom out ([#8379](https://github.com/mapbox/mapbox-gl-native/pull/8379))
|
||||
|
||||
### Networking and offline maps
|
||||
|
||||
|
||||
@@ -540,14 +540,11 @@ public:
|
||||
|
||||
_decelerationRate = MGLMapViewDecelerationRateNormal;
|
||||
|
||||
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)
|
||||
{
|
||||
_quickZoom = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleQuickZoomGesture:)];
|
||||
_quickZoom.numberOfTapsRequired = 1;
|
||||
_quickZoom.minimumPressDuration = 0;
|
||||
[_quickZoom requireGestureRecognizerToFail:doubleTap];
|
||||
[self addGestureRecognizer:_quickZoom];
|
||||
}
|
||||
_quickZoom = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleQuickZoomGesture:)];
|
||||
_quickZoom.numberOfTapsRequired = 1;
|
||||
_quickZoom.minimumPressDuration = 0;
|
||||
[_quickZoom requireGestureRecognizerToFail:doubleTap];
|
||||
[self addGestureRecognizer:_quickZoom];
|
||||
|
||||
// observe app activity
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user