diff options
author | Jason Wray <jason@mapbox.com> | 2017-03-13 12:45:17 -0400 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2017-03-13 16:49:46 -0400 |
commit | 48e17724a12601ebd76009990bc46f82519b1a76 (patch) | |
tree | 48499461860b070781c0c7579170216b5b833e48 /platform/ios | |
parent | e91be23b7f1759ba7da4d649b46475312d8097e8 (diff) | |
download | qtlocation-mapboxgl-48e17724a12601ebd76009990bc46f82519b1a76.tar.gz |
[ios] Enable one-finger quickzoom gesture on iPad
Diffstat (limited to 'platform/ios')
-rw-r--r-- | platform/ios/CHANGELOG.md | 1 | ||||
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 13 |
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 // |