summaryrefslogtreecommitdiff
path: root/platform/ios/src
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios/src')
-rw-r--r--platform/ios/src/MGLScaleBar.mm9
1 files changed, 6 insertions, 3 deletions
diff --git a/platform/ios/src/MGLScaleBar.mm b/platform/ios/src/MGLScaleBar.mm
index 690fbe5e5b..399f1b057a 100644
--- a/platform/ios/src/MGLScaleBar.mm
+++ b/platform/ios/src/MGLScaleBar.mm
@@ -181,12 +181,15 @@ static const CGFloat MGLFeetPerMeter = 3.28084;
// Zero is a special case (no formatting)
[self addZeroLabel];
- [NSNotificationCenter defaultCenter] addObserver:<#(nonnull id)#> selector:<#(nonnull SEL)#> name:<#(nullable NSNotificationName)#> object:NSCurrentLocaleDidChangeNotification
-// NSNotificationCenter addObserver:self forKeyPath:@selector(resetLabelImageCache) options:<#(NSKeyValueObservingOptions)#> context:<#(nullable void *)#>
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(resetLabelImageCache) name:NSCurrentLocaleDidChangeNotification object:nil];
}
+- (void)dealloc {
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
- (void)resetLabelImageCache {
-
+ self.labelImageCache = [[NSMutableDictionary alloc] init];
+
}
#pragma mark - Dimensions