- Updating menu frame and transformation when preparing to reveal, to ensure that even when the app launches in landscape mode the rotation is handled as soon as the menu is about to reveal
This commit is contained in:
parent
31351393eb
commit
15619fd4c7
|
|
@ -411,14 +411,15 @@ static SlideNavigationController *singletonInstance;
|
|||
UIViewController *removingMenuViewController = (menu == MenuLeft) ? self.rightMenu : self.leftMenu;
|
||||
|
||||
// If menu is already open don't prepare, unless forcePrepare is set to true
|
||||
// If already has been added to the view (has superview) it means it has been initialized so avoid reinitializing
|
||||
if (([self isMenuOpen] && !forcePrepare) || menuViewController.view.superview)
|
||||
if ([self isMenuOpen] && !forcePrepare)
|
||||
return;
|
||||
|
||||
[self.menuRevealAnimator prepareMenuForAnimation:menu];
|
||||
|
||||
[removingMenuViewController.view removeFromSuperview];
|
||||
[self.view.window insertSubview:menuViewController.view atIndex:0];
|
||||
|
||||
[self updateMenuFrameAndTransformAccordingToOrientation];
|
||||
|
||||
[self.menuRevealAnimator prepareMenuForAnimation:menu];
|
||||
}
|
||||
|
||||
- (CGFloat)horizontalLocation
|
||||
|
|
|
|||
Loading…
Reference in New Issue