From 57904361062027f16775aeb9a39b515f764d4185 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Tue, 20 Oct 2015 18:11:11 +0300 Subject: [PATCH] [ios] Fixed menu state restore on ios 7. --- iphone/Maps/Classes/MapViewController.mm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index 4d5d33a1b1..3dbeb6e1a8 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -525,6 +525,15 @@ typedef NS_ENUM(NSUInteger, UserTouchesAction) [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:) name:UIDeviceOrientationDidChangeNotification object:nil]; } +- (void)presentViewController:(UIViewController *)viewControllerToPresent + animated:(BOOL)flag + completion:(void (^__nullable)(void))completion +{ + if (isIOSVersionLessThan(8)) + self.menuRestoreState = self.controlsManager.menuState; + [super presentViewController:viewControllerToPresent animated:flag completion:completion]; +} + - (void)orientationChanged:(NSNotification *)notification { [self willRotateToInterfaceOrientation:self.interfaceOrientation duration:0.];