summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2017-03-13 12:45:17 -0400
committerJason Wray <jason@mapbox.com>2017-03-13 16:49:46 -0400
commit48e17724a12601ebd76009990bc46f82519b1a76 (patch)
tree48499461860b070781c0c7579170216b5b833e48 /platform
parente91be23b7f1759ba7da4d649b46475312d8097e8 (diff)
downloadqtlocation-mapboxgl-48e17724a12601ebd76009990bc46f82519b1a76.tar.gz
[ios] Enable one-finger quickzoom gesture on iPad
Diffstat (limited to 'platform')
-rw-r--r--platform/ios/CHANGELOG.md1
-rw-r--r--platform/ios/src/MGLMapView.mm13
2 files changed, 6 insertions, 8 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index 6ffad0af16..1b76470e6d 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -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
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 2333df5c9a..1baebf60bc 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -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
//