diff options
Diffstat (limited to 'platform/ios/MGLMapView.mm')
-rw-r--r-- | platform/ios/MGLMapView.mm | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index 18937b94fb..741f659ad4 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -1064,6 +1064,21 @@ mbgl::DefaultFileSource *mbglFileSource = nullptr; #pragma mark - Properties - ++ (NSSet *)keyPathsForValuesAffectingZoomEnabled +{ + return [NSSet setWithObject:@"allowsZooming"]; +} + ++ (NSSet *)keyPathsForValuesAffectingScrollEnabled +{ + return [NSSet setWithObject:@"allowsScrolling"]; +} + ++ (NSSet *)keyPathsForValuesAffectingRotateEnabled +{ + return [NSSet setWithObject:@"allowsRotating"]; +} + #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-parameter" @@ -2463,4 +2478,49 @@ class MBGLView : public mbgl::View } } ++ (NSSet *)keyPathsForValuesAffectingAllowsZooming +{ + return [NSSet setWithObject:@"zoomEnabled"]; +} + +- (BOOL)allowsZooming +{ + return self.zoomEnabled; +} + +- (void)setAllowsZooming:(BOOL)allowsZooming +{ + self.zoomEnabled = allowsZooming; +} + ++ (NSSet *)keyPathsForValuesAffectingAllowsScrolling +{ + return [NSSet setWithObject:@"scrollEnabled"]; +} + +- (BOOL)allowsScrolling +{ + return self.scrollEnabled; +} + +- (void)setAllowsScrolling:(BOOL)allowsScrolling +{ + self.scrollEnabled = allowsScrolling; +} + ++ (NSSet *)keyPathsForValuesAffectingAllowsRotating +{ + return [NSSet setWithObject:@"rotateEnabled"]; +} + +- (BOOL)allowsRotating +{ + return self.rotateEnabled; +} + +- (void)setAllowsRotating:(BOOL)allowsRotating +{ + self.rotateEnabled = allowsRotating; +} + @end |