From 705924b332e32943d7455b03bc4f134908cfae01 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Fri, 9 Dec 2016 13:06:35 +0300 Subject: [PATCH] [MAPSME-3143] [ios] Fixed traffic states handling. --- .../BottomMenu/MWMBottomMenuViewController.mm | 8 +++----- .../BottomMenu/MWMBottomMenuViewController.xib | 6 +++--- .../TrafficButton/MWMTrafficButtonViewController.mm | 1 - 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.mm index 2208339d4c..11ac85d639 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.mm @@ -229,7 +229,6 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { { BOOL const isEnable = sender.selected; [Statistics logEvent:kStatMenu withParameters:@{kStatTTS : isEnable ? kStatOn : kStatOff}]; - sender.coloring = isEnable ? MWMButtonColoringBlue : MWMButtonColoringGray; [MWMTextToSpeech tts].active = isEnable; [self refreshRoutingDiminishTimer]; } @@ -240,7 +239,6 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { { MWMButton * tb = self.trafficButton; BOOL const enabled = ([MWMTrafficManager state] != TrafficManager::TrafficState::Disabled); - tb.coloring = enabled ? MWMButtonColoringBlue : MWMButtonColoringGray; tb.selected = enabled; } @@ -602,9 +600,9 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { - (void)setTtsSoundButton:(MWMButton *)ttsSoundButton { _ttsSoundButton = ttsSoundButton; - [ttsSoundButton setImage:[UIImage imageNamed:@"ic_voice_on"] forState:UIControlStateNormal]; - [ttsSoundButton setImage:[UIImage imageNamed:@"ic_voice_off"] forState:UIControlStateSelected]; - [ttsSoundButton setImage:[UIImage imageNamed:@"ic_voice_off"] + [ttsSoundButton setImage:[UIImage imageNamed:@"ic_voice_off"] forState:UIControlStateNormal]; + [ttsSoundButton setImage:[UIImage imageNamed:@"ic_voice_on"] forState:UIControlStateSelected]; + [ttsSoundButton setImage:[UIImage imageNamed:@"ic_voice_on"] forState:UIControlStateSelected | UIControlStateHighlighted]; [self ttsButtonStatusChanged:nil]; } diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.xib b/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.xib index a2d160d528..4d7b2460d8 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.xib +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.xib @@ -452,7 +452,7 @@ -