Merge pull request #3944 from igrechuhin/MAPSME-2056

[ios] Fixed routing planning on iPad.
This commit is contained in:
Vlad Mihaylenko 2016-08-03 21:34:07 +04:00 committed by GitHub
commit 6ec54a4002

View file

@ -166,19 +166,27 @@ extern NSString * const kAlohalyticsTapEventKey;
else if (m == MWMRoutingPlaneModePlacePage)
{
if (state == MWMSearchManagerStateHidden)
return;
[UIView animateWithDuration:kDefaultAnimationDuration
animations:^{
self.navigationManager.routePreview.alpha = 0.;
}
completion:^(BOOL finished) {
MapsAppDelegate.theApp.routingPlaneMode = MWMRoutingPlaneModeNone;
self.navigationManager.routePreview.alpha = 1.;
[self.navigationManager.routePreview removeFromSuperview];
[[MWMRouter router] stop];
self.navigationManager.state = MWMNavigationDashboardStateHidden;
self.menuController.p2pButton.selected = NO;
}];
{
[UIView animateWithDuration:kDefaultAnimationDuration
animations:^{
self.navigationManager.routePreview.alpha = 1.;
}];
}
else
{
[UIView animateWithDuration:kDefaultAnimationDuration
animations:^{
self.navigationManager.routePreview.alpha = 0.;
}
completion:^(BOOL finished) {
MapsAppDelegate.theApp.routingPlaneMode = MWMRoutingPlaneModeNone;
self.navigationManager.routePreview.alpha = 1.;
[self.navigationManager.routePreview removeFromSuperview];
[[MWMRouter router] stop];
self.navigationManager.state = MWMNavigationDashboardStateHidden;
self.menuController.p2pButton.selected = NO;
}];
}
}
}