diff options
author | Jason Wray <jason@mapbox.com> | 2017-09-01 15:10:26 -0400 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2017-09-07 19:23:29 -0400 |
commit | 63250baa4e73516f300e84ddbc882fc8d41276ef (patch) | |
tree | 24e38bcfe1835ea8d5bef028927e6066dd946cd1 /platform | |
parent | e1ff826d2023eb2b3f366353e960057768bcc855 (diff) | |
download | qtlocation-mapboxgl-63250baa4e73516f300e84ddbc882fc8d41276ef.tar.gz |
[ios] Make user heading indicator property IBInspectable
Rename it to `showsHeading` to fit in the tiny label column of the utilities panel.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/src/MGLMapView+IBAdditions.h | 1 | ||||
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/platform/ios/src/MGLMapView+IBAdditions.h b/platform/ios/src/MGLMapView+IBAdditions.h index 3766d044d8..d02c938c57 100644 --- a/platform/ios/src/MGLMapView+IBAdditions.h +++ b/platform/ios/src/MGLMapView+IBAdditions.h @@ -41,6 +41,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic) IBInspectable BOOL allowsRotating; @property (nonatomic) IBInspectable BOOL allowsTilting; @property (nonatomic) IBInspectable BOOL showsUserLocation; +@property (nonatomic) IBInspectable BOOL showsHeading; @end diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 6121827d6c..e6d10f3479 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -5775,4 +5775,19 @@ private: self.pitchEnabled = allowsTilting; } ++ (NS_SET_OF(NSString *) *)keyPathsForValuesAffectingShowsHeading +{ + return [NSSet setWithObject:@"showsUserHeadingIndicator"]; +} + +- (BOOL)showsHeading +{ + return self.showsUserHeadingIndicator; +} + +- (void)setShowsHeading:(BOOL)showsHeading +{ + self.showsUserHeadingIndicator = showsHeading; +} + @end |