Closed mattbond closed 10 years ago
One workaround is to use the superview frame rather than the view frame in setLeftSideMenuFrameToClosedPosition and setRightSideMenuFrameToClosedPosition Tested on iOS 6.1 & 7.03 Simulators iPhone & iPad (I don't have a 5.1 Sim on my Mac anymore)
- (void) setLeftSideMenuFrameToClosedPosition {
if(!self.leftMenuViewController) return;
- CGRect leftFrame = [self.leftMenuViewController view].frame;
+ CGRect leftFrame = [self.leftMenuViewController view].superview.frame;
leftFrame.size.width = self.leftMenuWidth;
leftFrame.origin.x = (self.menuSlideAnimationEnabled) ? -1*leftFrame.size.width / self.menuSlideAnimationFactor : 0;
leftFrame.origin.y = 0;
[self.leftMenuViewController view].frame = leftFrame;
[self.leftMenuViewController view].autoresizingMask = UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleHeight;
The reason that this bug does not affect iPhone is because the iPhone Springboard is always shown in portrait mode and thus the app always starts in Portrait mode and then rotates to Landscape mode.
I am closing this, I think it must have been addressed in another commit because I can't replicate it.
If you start (and I don't mean resume) the MFSideMenuDemoBasic App with the iPad in Landscape mode then you can't scroll the left or right menus to the bottom. All items below section 1 item 5 are off screen. It looks like the view has 1024 height instead of 768 and thus the rest is off screen.
if you increase the number of items per section to 20 in the sample then the menu stops at Section 1 Item 13
By Adding this code to SideMenuViewController.m and forcing a Memory Warning in the Simulator (Menu: Hardware, Simulate Memory Warning) for the demo App, started in Landscape, with the left-Menu open: we can see the View/Window hierarchy and see that just the UITableView has the incorrect height its parent & predecessors all have 748 (768 - statusBar on iOS 6.1)