[ios] Fixed menu state restoration.

This commit is contained in:
Ilya Grechuhin 2015-10-15 15:31:04 +03:00
parent 83fcafc3e9
commit bb8e84f015
2 changed files with 4 additions and 9 deletions

View file

@ -322,8 +322,9 @@ extern NSString * const kAlohalyticsTapEventKey;
- (MWMBottomMenuState)menuState
{
if (self.menuController.state == MWMBottomMenuStateActive)
return MWMBottomMenuStateActive;
MWMBottomMenuState const state = self.menuController.state;
if (state != MWMBottomMenuStateHidden)
return state;
return _menuState;
}

View file

@ -517,16 +517,10 @@ typedef NS_ENUM(NSUInteger, UserTouchesAction)
self.controlsManager = [[MWMMapViewControlsManager alloc] initWithParentController:self];
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
self.menuRestoreState = self.controlsManager.menuState;
}
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
self.menuRestoreState = self.controlsManager.menuState;
GetFramework().SetUpdatesEnabled(false);
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:) name:UIDeviceOrientationDidChangeNotification object:nil];
}