Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[ios] Allow MGLScaleBar to support dark mode on iOS 13 #15524

Merged
merged 1 commit into from
Aug 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions platform/ios/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions platform/ios/src/MGLScaleBar.mm
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ @implementation MGLScaleBarLabel

- (void)drawTextInRect:(CGRect)rect {
CGSize shadowOffset = self.shadowOffset;
UIColor *textColor = self.textColor;

CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(context, 2);
Expand All @@ -112,7 +111,7 @@ - (void)drawTextInRect:(CGRect)rect {
[super drawTextInRect:rect];

CGContextSetTextDrawingMode(context, kCGTextFill);
self.textColor = textColor;
self.textColor = [UIColor blackColor];
self.shadowOffset = CGSizeMake(0, 0);
[super drawTextInRect:rect];

Expand Down