diff options
Diffstat (limited to 'platform/ios/src/MGLMapView.h')
-rw-r--r-- | platform/ios/src/MGLMapView.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h index 62f053e96b..1f2031e055 100644 --- a/platform/ios/src/MGLMapView.h +++ b/platform/ios/src/MGLMapView.h @@ -28,7 +28,7 @@ extern const CGFloat MGLMapViewDecelerationRateNormal; /** A fast deceleration rate for a map view. */ extern const CGFloat MGLMapViewDecelerationRateFast; -/** Disables decleration in a map view. */ +/** Disables deceleration in a map view. */ extern const CGFloat MGLMapViewDecelerationRateImmediate; /** @@ -73,8 +73,23 @@ typedef NS_ENUM(NSUInteger, MGLAnnotationVerticalAlignment) { your Mapbox account. They also deter other developers from using your styles without your permission. + Adding your own gesture recognizer to `MGLMapView` will block the corresponding + gesture recognizer built into `MGLMapView`. To avoid conflicts, define which + gesture takes precedence. For example, you can create your own + `UITapGestureRecognizer` that will be invoked only if the default `MGLMapView` + tap gesture fails: + + ```swift + let mapTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(myCustomFunction)) + for recognizer in mapView.gestureRecognizers! where recognizer is UITapGestureRecognizer { + mapTapGestureRecognizer.require(toFail: recognizer) + } + mapView.addGestureRecognizer(mapTapGestureRecognizer) + ``` + @note You are responsible for getting permission to use the map data and for ensuring that your use adheres to the relevant terms of use. + */ IB_DESIGNABLE @interface MGLMapView : UIView |