From dcd9a38388fe5fc4c70a3e39af4db10a3c09ed49 Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Mon, 24 Jul 2017 19:24:24 -0400 Subject: [PATCH] [ios] Don't force the attribution button tint color to update --- platform/ios/CHANGELOG.md | 1 + platform/ios/src/MGLMapView.mm | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 93da2ff372c..9ebf52311f3 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -5,6 +5,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT ## 3.6.1 * Reduced the size of the dynamic framework by optimizing symbol visibility. ([#7604](https://github.com/mapbox/mapbox-gl-native/pull/7604)) +* Fixed an issue where the attribution button would have its custom tint color reset when the map view received a tint color change notification, such as when an alert controller was presented. ([#9598](https://github.com/mapbox/mapbox-gl-native/pull/9598)) ## 3.6.0 - June 29, 2017 diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index f3b0d8506a2..2de1496998d 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -1144,8 +1144,10 @@ - (void)tintColorDidChange - (void)updateTintColorForView:(UIView *)view { - // stop at recursing container & annotation views (#8522) - if ([view isEqual:self.annotationContainerView]) return; + // Don't update: + // - annotation views + // - attribution button (handled automatically) + if ([view isEqual:self.annotationContainerView] || [view isEqual:self.attributionButton]) return; if ([view respondsToSelector:@selector(setTintColor:)]) view.tintColor = self.tintColor;