summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/ios/app/MBXViewController.m11
1 files changed, 5 insertions, 6 deletions
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m
index d82bc18f78..118a1ded0f 100644
--- a/platform/ios/app/MBXViewController.m
+++ b/platform/ios/app/MBXViewController.m
@@ -1270,14 +1270,13 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) {
}
else if ([layer.text isKindOfClass:[MGLCameraStyleFunction class]]) {
MGLCameraStyleFunction *function = (MGLCameraStyleFunction<NSString *> *)layer.text;
- [function.stops enumerateKeysAndObjectsUsingBlock:^(id zoomLevel, id stop, BOOL *done) {
- if ([stop isKindOfClass:[MGLStyleConstantValue class]]) {
- MGLStyleConstantValue *label = (MGLStyleConstantValue<NSString *> *)stop;
- if ([label.rawValue hasPrefix:@"{name"]) {
- [function.stops setValue:[MGLStyleValue valueWithRawValue:language] forKey:zoomLevel];
- }
+ NSMutableDictionary *stops = function.stops.mutableCopy;
+ [stops enumerateKeysAndObjectsUsingBlock:^(NSNumber *zoomLevel, MGLStyleConstantValue<NSString *> *stop, BOOL *done) {
+ if ([stop.rawValue hasPrefix:@"{name"]) {
+ stops[zoomLevel] = [MGLStyleValue<NSString *> valueWithRawValue:language];
}
}];
+ function.stops = stops;
layer.text = function;
}
} else {