From 2984535804282062f93a2a62b745ba636e5746fa Mon Sep 17 00:00:00 2001 From: Nadia Barbosa Date: Thu, 29 Aug 2019 11:22:24 -0700 Subject: [ios] Allow MGLScaleBar to support dark mode on iOS 13 Add changelog PR link --- platform/ios/CHANGELOG.md | 1 + platform/ios/src/MGLScaleBar.mm | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'platform') diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index c45835b1db..44c2898333 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -7,6 +7,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * Fixed an issue that caused the tilt gesture to trigger too easily and conflict with pinch or pan gestures. ([#15349](https://github.com/mapbox/mapbox-gl-native/pull/15349)) * Fixed a bug with annotation view positions after camera transitions. ([#15122](https://github.com/mapbox/mapbox-gl-native/pull/15122/)) * Fixed a rendering issue of `collisionBox` when `text-translate` or `icon-translate` is enabled. ([#15467](https://github.com/mapbox/mapbox-gl-native/pull/15467)) +* Fixed an issue where the scale bar text would become illegible if iOS 13 dark mode was enabled. ([#15524](https://github.com/mapbox/mapbox-gl-native/pull/15524)) ### Performance improvements diff --git a/platform/ios/src/MGLScaleBar.mm b/platform/ios/src/MGLScaleBar.mm index 993852d8b9..cd8bc1d030 100644 --- a/platform/ios/src/MGLScaleBar.mm +++ b/platform/ios/src/MGLScaleBar.mm @@ -101,7 +101,6 @@ static const CGFloat MGLFeetPerMeter = 3.28084; - (void)drawTextInRect:(CGRect)rect { CGSize shadowOffset = self.shadowOffset; - UIColor *textColor = self.textColor; CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLineWidth(context, 2); @@ -112,7 +111,7 @@ static const CGFloat MGLFeetPerMeter = 3.28084; [super drawTextInRect:rect]; CGContextSetTextDrawingMode(context, kCGTextFill); - self.textColor = textColor; + self.textColor = [UIColor blackColor]; self.shadowOffset = CGSizeMake(0, 0); [super drawTextInRect:rect]; -- cgit v1.2.1