Skip to content

Commit 15619fd

Browse files
committed
- 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
1 parent 3135139 commit 15619fd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

SlideMenu/Source/SlideNavigationController.m

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,14 +411,15 @@ - (void)prepareMenuForReveal:(Menu)menu forcePrepare:(BOOL)forcePrepare
411411
UIViewController *removingMenuViewController = (menu == MenuLeft) ? self.rightMenu : self.leftMenu;
412412

413413
// If menu is already open don't prepare, unless forcePrepare is set to true
414-
// If already has been added to the view (has superview) it means it has been initialized so avoid reinitializing
415-
if (([self isMenuOpen] && !forcePrepare) || menuViewController.view.superview)
414+
if ([self isMenuOpen] && !forcePrepare)
416415
return;
417416

418-
[self.menuRevealAnimator prepareMenuForAnimation:menu];
419-
420417
[removingMenuViewController.view removeFromSuperview];
421418
[self.view.window insertSubview:menuViewController.view atIndex:0];
419+
420+
[self updateMenuFrameAndTransformAccordingToOrientation];
421+
422+
[self.menuRevealAnimator prepareMenuForAnimation:menu];
422423
}
423424

424425
- (CGFloat)horizontalLocation

0 commit comments

Comments
 (0)