diff options
author | Ilya Grechuhin <i.grechuhin@gmail.com> | 2017-07-05 11:45:14 +0300 |
---|---|---|
committer | Vlad Mihaylenko <vxmihaylenko@gmail.com> | 2017-07-05 12:54:16 +0300 |
commit | d0db43fe98ad57e61521b4ae357a7e2c4bec5d5e (patch) | |
tree | 401893559a629588c7a4ea9c9ea37b8be35343c4 | |
parent | 699b98b6e1ba98e89229cc998db8a2854bc9b01f (diff) |
[MAPSME-4817] [ios] Fixed iPad search openning in route planning mode.beta-894
-rw-r--r-- | iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm | 46 | ||||
-rw-r--r-- | iphone/Maps/UI/BottomMenu/MWMBottomMenuView.mm | 3 |
2 files changed, 5 insertions, 44 deletions
diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm index ac88decc09..26144cf044 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm @@ -187,29 +187,6 @@ extern NSString * const kAlohalyticsTapEventKey; } } [self.ownerController setNeedsStatusBarAppearanceUpdate]; - if (!IPAD || (state != MWMSearchManagerStateDefault && state != MWMSearchManagerStateHidden)) - return; - if (state == MWMSearchManagerStateHidden) - { - [UIView animateWithDuration:kDefaultAnimationDuration - animations:^{ - self.navigationManager.routePreview.alpha = 1.; - }]; - } - else - { - [UIView animateWithDuration:kDefaultAnimationDuration - animations:^{ - self.navigationManager.routePreview.alpha = 0.; - } - completion:^(BOOL finished) { - self.navigationManager.routePreview.alpha = 1.; - [self.navigationManager.routePreview removeFromSuperview]; - [MWMRouter stopRouting]; - self.navigationManager.state = MWMNavigationDashboardStateHidden; - self.menuController.p2pButton.selected = NO; - }]; - } } - (void)searchFrameUpdated:(CGRect)frame @@ -324,25 +301,9 @@ extern NSString * const kAlohalyticsTapEventKey; if (IPAD) { CGFloat const bound = newFrame.origin.x + newFrame.size.width; - if (self.searchManager.state == MWMSearchManagerStateHidden) - { - CGFloat const leftBound = newFrame.origin.x + newFrame.size.width; - self.navigationManager.leftBound = leftBound; - self.placePageManager.leftBound = leftBound; - self.trafficButton.leftBound = leftBound; - } - else - { - [UIView animateWithDuration:kDefaultAnimationDuration - animations:^{ - CGFloat const alpha = bound > 0 ? 0. : 1.; - for (UIView * view in self.searchManager.topViews) - view.alpha = alpha; - } - completion:^(BOOL finished) { - self.searchManager.state = MWMSearchManagerStateHidden; - }]; - } + self.navigationManager.leftBound = bound; + self.placePageManager.leftBound = bound; + self.trafficButton.leftBound = bound; } else { @@ -350,7 +311,6 @@ extern NSString * const kAlohalyticsTapEventKey; self.placePageManager.topBound = bound; self.sideButtons.topBound = bound; self.trafficButton.topBound = bound; - return; } } diff --git a/iphone/Maps/UI/BottomMenu/MWMBottomMenuView.mm b/iphone/Maps/UI/BottomMenu/MWMBottomMenuView.mm index 0ec19c095c..015305bc3a 100644 --- a/iphone/Maps/UI/BottomMenu/MWMBottomMenuView.mm +++ b/iphone/Maps/UI/BottomMenu/MWMBottomMenuView.mm @@ -729,7 +729,8 @@ CGFloat constexpr kTimeWidthRegular = 128; - (void)setLeftBound:(CGFloat)leftBound { _leftBound = MAX(leftBound, 0.0); - self.state = _leftBound > 1.0 ? MWMBottomMenuStateCompact : self.restoreState; + if ([MWMNavigationDashboardManager manager].state != MWMNavigationDashboardStatePrepare) + self.state = _leftBound > 1.0 ? MWMBottomMenuStateCompact : self.restoreState; [self setNeedsLayout]; } |