diff options
author | Fabian Guerra <fabian.guerra@mapbox.com> | 2017-12-07 20:20:17 -0500 |
---|---|---|
committer | Fabian Guerra Soto <fabian.guerra@mapbox.com> | 2017-12-14 09:45:44 -0600 |
commit | d650b91c00956b683519aa76b3f5dfd327c17348 (patch) | |
tree | 887374a661b9328c687ab7f8ffc788661678ba72 /platform/ios/src/MGLMapView.mm | |
parent | 4525ff714adb483a213638e251c38156bd7fa04e (diff) | |
download | qtlocation-mapboxgl-d650b91c00956b683519aa76b3f5dfd327c17348.tar.gz |
[ios] Fix the content insets for the scale and compass view.
Diffstat (limited to 'platform/ios/src/MGLMapView.mm')
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 60c2e0dd09..6215d4b7c9 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -885,8 +885,10 @@ public: // compass view [self removeConstraints:self.compassViewConstraints]; [self.compassViewConstraints removeAllObjects]; - [self.compassViewConstraints addObject:[self.compassView.topAnchor constraintEqualToAnchor:safeAreaLayoutGuide.topAnchor - constant:5.0 + self.contentInset.top]]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpartial-availability" + [self.compassViewConstraints addObject:[self.compassView.topAnchor constraintEqualToSystemSpacingBelowAnchor:safeAreaLayoutGuide.topAnchor multiplier:1]]; +#pragma clang diagnostic pop [self.compassViewConstraints addObject:[safeAreaLayoutGuide.rightAnchor constraintEqualToAnchor:self.compassView.rightAnchor constant:8.0 + self.contentInset.right]]; [self addConstraints:self.compassViewConstraints]; @@ -894,8 +896,10 @@ public: // scale bar view [self removeConstraints:self.scaleBarConstraints]; [self.scaleBarConstraints removeAllObjects]; - [self.scaleBarConstraints addObject:[self.scaleBar.topAnchor constraintEqualToAnchor:safeAreaLayoutGuide.topAnchor - constant:5.0 + self.contentInset.top]]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpartial-availability" + [self.scaleBarConstraints addObject:[self.scaleBar.topAnchor constraintEqualToSystemSpacingBelowAnchor:safeAreaLayoutGuide.topAnchor multiplier:1]]; +#pragma clang diagnostic pop [self.scaleBarConstraints addObject:[self.scaleBar.leftAnchor constraintEqualToAnchor:safeAreaLayoutGuide.leftAnchor constant:8.0 + self.contentInset.left]]; [self addConstraints:self.scaleBarConstraints]; |