summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLScaleBar.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios/src/MGLScaleBar.mm')
-rw-r--r--platform/ios/src/MGLScaleBar.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/ios/src/MGLScaleBar.mm b/platform/ios/src/MGLScaleBar.mm
index 993852d8b9..1a29b1aa1c 100644
--- a/platform/ios/src/MGLScaleBar.mm
+++ b/platform/ios/src/MGLScaleBar.mm
@@ -102,6 +102,12 @@ static const CGFloat MGLFeetPerMeter = 3.28084;
- (void)drawTextInRect:(CGRect)rect {
CGSize shadowOffset = self.shadowOffset;
UIColor *textColor = self.textColor;
+
+ if (@available(iOS 13.0, *)) {
+ if (UITraitCollection.currentTraitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
+ textColor = UIColor.blackColor;
+ }
+ }
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(context, 2);