Merge pull request #256 from igrechuhin/ig-pp

[ios] Fixed menu state restoration.
This commit is contained in:
Vlad Mihaylenko 2015-10-15 17:02:12 +03:00
commit 0fe59d38d8
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];
}