forked from organicmaps/organicmaps
[ios] Fixed menu state restoration.
This commit is contained in:
parent
83fcafc3e9
commit
bb8e84f015
2 changed files with 4 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue