diff --git a/iphone/Maps/Common/Statistics/StatisticsStrings.h b/iphone/Maps/Common/Statistics/StatisticsStrings.h index 0313e16850..f1ed8df445 100644 --- a/iphone/Maps/Common/Statistics/StatisticsStrings.h +++ b/iphone/Maps/Common/Statistics/StatisticsStrings.h @@ -193,6 +193,7 @@ static NSString * const kStatShare = @"Share"; static NSString * const kStatShowBig2SmallMWM = @"Big mwms to small mwms dialog appearing counter"; static NSString * const kStatShowOnMap = @"Show on map"; static NSString * const kStatSignup = @"Signup"; +static NSString * const kStatSimplifiedColors = @"Simplified colors scheme"; static NSString * const kStatSocial = @"Social"; static NSString * const kStatSource = @"Source"; static NSString * const kStatStart = @"Start"; diff --git a/iphone/Maps/UI/Settings/MWMSettingsViewController.mm b/iphone/Maps/UI/Settings/MWMSettingsViewController.mm index b9f3a1a8f1..9fedc658a7 100644 --- a/iphone/Maps/UI/Settings/MWMSettingsViewController.mm +++ b/iphone/Maps/UI/Settings/MWMSettingsViewController.mm @@ -35,6 +35,7 @@ extern NSString * const kAlohalyticsTapEventKey; @property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell * perspectiveViewCell; @property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell * autoZoomCell; @property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * voiceInstructionsCell; +@property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell * simplifiedColorsCell; @property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * helpCell; @property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * aboutCell; @@ -172,6 +173,10 @@ extern NSString * const kAlohalyticsTapEventKey; voiceInstructions = L(@"duration_disabled"); } [self.voiceInstructionsCell configWithTitle:L(@"pref_tts_language_title") info:voiceInstructions]; + + [self.simplifiedColorsCell configWithDelegate:self + title:L(@"pref_traffic_simplified_colors_title") + isOn:GetFramework().LoadTrafficSimplifiedColors()]; } - (void)configInfoSection @@ -253,6 +258,14 @@ extern NSString * const kAlohalyticsTapEventKey; f.AllowAutoZoom(value); f.SaveAutoZoom(value); } + else if (cell == self.simplifiedColorsCell) + { + [Statistics logEvent:kStatEventName(kStatSettings, kStatSimplifiedColors) + withParameters:@{kStatValue : value ? kStatOn : kStatOff}]; + auto & f = GetFramework(); + f.GetTrafficManager().SetSimplifiedColorScheme(value); + f.SaveTrafficSimplifiedColors(value); + } } #pragma mark - UITableViewDelegate diff --git a/iphone/Maps/UI/Storyboard/Settings.storyboard b/iphone/Maps/UI/Storyboard/Settings.storyboard index b533289b81..6e0e0450e7 100644 --- a/iphone/Maps/UI/Storyboard/Settings.storyboard +++ b/iphone/Maps/UI/Storyboard/Settings.storyboard @@ -1,5 +1,5 @@ - + @@ -29,13 +29,13 @@