[ios] Enable one-finger quickzoom gesture on iPad

This commit is contained in:
Jason Wray
2017-03-13 12:45:17 -04:00
parent e91be23b7f
commit 48e17724a1
2 changed files with 6 additions and 8 deletions

View File

@@ -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

View File

@@ -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
//