Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlad Mihaylenko <vxmihaylenko@gmail.com>2016-12-09 13:41:01 +0300
committerGitHub <noreply@github.com>2016-12-09 13:41:01 +0300
commit0d7619c3700e0510b7eafbd952d6e723af92cf8c (patch)
tree80c8355e5d7556407158c8383d63e5a2356fc4c8 /iphone/Maps
parentfc8189106a38692a746597ebb9548bbcd218068e (diff)
parent705924b332e32943d7455b03bc4f134908cfae01 (diff)
Merge pull request #4928 from igrechuhin/MAPSME-3143
[MAPSME-3143] [ios] Fixed traffic states handling.
Diffstat (limited to 'iphone/Maps')
-rw-r--r--iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.mm8
-rw-r--r--iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.xib6
-rw-r--r--iphone/Maps/Classes/CustomViews/MapViewControls/TrafficButton/MWMTrafficButtonViewController.mm1
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 @@
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Z8y-bh-6dN">
<rect key="frame" x="0.0" y="48" width="320" height="64"/>
<subviews>
- <button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="249" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q6M-3k-tKX" customClass="MWMButton">
+ <button opaque="NO" contentMode="center" horizontalHuggingPriority="249" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q6M-3k-tKX" customClass="MWMButton">
<rect key="frame" x="8" y="0.0" width="64" height="64"/>
<constraints>
<constraint firstAttribute="height" constant="64" id="10m-d2-9gu"/>
@@ -461,7 +461,7 @@
<state key="normal" image="ic_voice_on"/>
<state key="selected" image="ic_voice_off"/>
<userDefinedRuntimeAttributes>
- <userDefinedRuntimeAttribute type="string" keyPath="coloringName" value="MWMBlue"/>
+ <userDefinedRuntimeAttribute type="string" keyPath="coloringName" value="MWMBlack"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="soundTouchUpInside:" destination="-1" eventType="touchUpInside" id="CEW-OG-NlS"/>
@@ -476,7 +476,7 @@
<state key="normal" image="ic_setting_traffic_on"/>
<state key="selected" image="ic_setting_traffic_off"/>
<userDefinedRuntimeAttributes>
- <userDefinedRuntimeAttribute type="string" keyPath="coloringName" value="MWMBlue"/>
+ <userDefinedRuntimeAttribute type="string" keyPath="coloringName" value="MWMBlack"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="trafficTouchUpInside:" destination="-1" eventType="touchUpInside" id="4Fg-pP-9MU"/>
diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/TrafficButton/MWMTrafficButtonViewController.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/TrafficButton/MWMTrafficButtonViewController.mm
index 353c014f3a..4f886491fa 100644
--- a/iphone/Maps/Classes/CustomViews/MapViewControls/TrafficButton/MWMTrafficButtonViewController.mm
+++ b/iphone/Maps/Classes/CustomViews/MapViewControls/TrafficButton/MWMTrafficButtonViewController.mm
@@ -153,7 +153,6 @@ NSArray<UIImage *> * imagesWithName(NSString * name)
case TrafficManager::TrafficState::WaitingData:
iv.animationImages = imagesWithName(@"btn_traffic_update");
iv.animationDuration = 0.8;
- iv.image = iv.animationImages.lastObject;
[iv startAnimating];
break;
case TrafficManager::TrafficState::Outdated: