summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2017-09-01 15:10:26 -0400
committerJason Wray <jason@mapbox.com>2017-09-07 19:23:29 -0400
commit63250baa4e73516f300e84ddbc882fc8d41276ef (patch)
tree24e38bcfe1835ea8d5bef028927e6066dd946cd1 /platform
parente1ff826d2023eb2b3f366353e960057768bcc855 (diff)
downloadqtlocation-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.h1
-rw-r--r--platform/ios/src/MGLMapView.mm15
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