diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuView.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuView.mm index 90fc120410..aa2b19872b 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuView.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuView.mm @@ -44,6 +44,8 @@ self.goButton.hidden = YES; self.streetLabel.hidden = YES; self.restoreState = MWMBottomMenuStateInactive; + [self.goButton setBackgroundColor:[UIColor linkBlue] forState:UIControlStateNormal]; + [self.goButton setBackgroundColor:[UIColor linkBlueDark] forState:UIControlStateHighlighted]; } - (void)layoutSubviews @@ -154,8 +156,6 @@ break; case MWMBottomMenuStatePlanning: case MWMBottomMenuStateGo: - [self.goButton setBackgroundColor:[UIColor linkBlue] forState:UIControlStateNormal]; - [self.goButton setBackgroundColor:[UIColor linkBlueDark] forState:UIControlStateHighlighted]; self.bookmarksButton.hidden = YES; self.p2pButton.hidden = YES; self.searchButton.hidden = YES; diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/MWMNavigationView.h b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/MWMNavigationView.h index a12e916ef5..d2a9503c87 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/MWMNavigationView.h +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/MWMNavigationView.h @@ -5,7 +5,7 @@ @property (nonatomic) CGFloat topBound; @property (nonatomic) CGFloat leftBound; @property (nonatomic, readonly) CGFloat visibleHeight; -@property (nonatomic, readonly) CGFloat defaultHeight; +@property (nonatomic) CGFloat defaultHeight; @property (nonatomic, readonly) BOOL isVisible; @property (nonatomic) UIView * statusbarBackground; @property (weak, nonatomic) id delegate; diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/MWMNavigationView.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/MWMNavigationView.mm index 98218f6f8d..7a0a2e3a85 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/MWMNavigationView.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/MWMNavigationView.mm @@ -6,7 +6,6 @@ static CGFloat const kStatusbarHeight = 20.0; @interface MWMNavigationView () @property (nonatomic) BOOL isVisible; -@property (nonatomic, readwrite) CGFloat defaultHeight; @property (weak, nonatomic, readwrite) IBOutlet UIView * contentView; diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.mm index 240133585a..802a87cd38 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.mm @@ -12,7 +12,6 @@ static NSDictionary * const kEtaAttributes = @{NSForegroundColorAttributeName : UIColor.blackPrimaryText, NSFontAttributeName : UIFont.medium17}; -static CGFloat const kBottomPanelHeight = 48.; static CGFloat const kAdditionalHeight = 20.; @interface MWMRoutePreview () @@ -20,6 +19,7 @@ static CGFloat const kAdditionalHeight = 20.; @property (weak, nonatomic) IBOutlet UIView * pedestrian; @property (weak, nonatomic) IBOutlet UIView * vehicle; @property (weak, nonatomic) IBOutlet NSLayoutConstraint * planningRouteViewHeight; +@property (weak, nonatomic) IBOutlet NSLayoutConstraint * planningContainerHeight; @property (weak, nonatomic, readwrite) IBOutlet UIButton * extendButton; @property (weak, nonatomic) IBOutlet UIButton * goButton; @property (weak, nonatomic) IBOutlet UICollectionView * collectionView; @@ -241,7 +241,7 @@ static CGFloat const kAdditionalHeight = 20.; - (CGFloat)visibleHeight { - return self.planningRouteViewHeight.constant + kBottomPanelHeight + kAdditionalHeight; + return self.planningRouteViewHeight.constant + self.planningContainerHeight.constant + kAdditionalHeight; } - (IBAction)extendTap @@ -265,13 +265,19 @@ static CGFloat const kAdditionalHeight = 20.; return; if (IPAD) { - self.height = self.superview.height - kAdditionalHeight; + CGFloat const selfHeight = self.superview.height - kAdditionalHeight; + self.defaultHeight = selfHeight; + self.height = selfHeight; return; } BOOL const isPortrait = self.superview.height > self.superview.width; CGFloat const height = isPortrait ? 140. : 96.; - self.planningRouteViewHeight.constant = self.extendButton.selected ? height : 44.; - [self.dashboardManager.delegate routePreviewDidChangeFrame:{self.origin, {self.width, self.planningRouteViewHeight.constant + kBottomPanelHeight + kAdditionalHeight}}]; + CGFloat const planningRouteViewHeight = self.extendButton.selected ? height : 44.; + self.planningRouteViewHeight.constant = planningRouteViewHeight; + CGFloat const selfHeight = planningRouteViewHeight + self.planningContainerHeight.constant; + self.defaultHeight = selfHeight; + self.height = selfHeight; + [self.dashboardManager.delegate routePreviewDidChangeFrame:{self.origin, {self.width, selfHeight + kAdditionalHeight}}]; } - (void)setDataSource:(id)dataSource diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.xib b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.xib index 3cdfea99ab..5149a73a63 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.xib +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.xib @@ -1,8 +1,8 @@ - + - + @@ -112,7 +112,7 @@ - + @@ -260,6 +260,7 @@ +