[ios] Fixed menu state restore on ios 7.

This commit is contained in:
Ilya Grechuhin 2015-10-20 18:11:11 +03:00
parent 01e38802aa
commit 5790436106

View file

@ -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.];