Skip to content

Update MFSideMenuContainerViewController.m #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions MFSideMenu/MFSideMenuContainerViewController.m
Original file line number Diff line number Diff line change
@@ -90,16 +90,26 @@ - (void)setDefaultSettings {
- (void)setupMenuContainerView {
if(self.menuContainerView.superview) return;

self.menuContainerView.frame = self.view.bounds;
CGRect frame = self.view.bounds;
frame.origin.x = 0;
//Account for notification bar
frame.origin.y = 20;
frame.size.height = frame.size.height - 20;

self.menuContainerView.frame = frame;
self.menuContainerView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;

[self.view insertSubview:menuContainerView atIndex:0];

if(self.leftMenuViewController && !self.leftMenuViewController.view.superview) {
[self.menuContainerView addSubview:self.leftMenuViewController.view];
//added to account for when app is started in landscape that it takes the right size
self.leftMenuViewController.view.frame = frame;
[self.menuContainerView addSubview:self.leftMenuViewController.view];
}

if(self.rightMenuViewController && !self.rightMenuViewController.view.superview) {
//added to account for when app is started in landscape that it takes the right size
self.rightMenuViewController.view.frame = frame;
[self.menuContainerView addSubview:self.rightMenuViewController.view];
}
}
@@ -755,4 +765,4 @@ - (CGFloat)animationDurationFromStartPosition:(CGFloat)startPosition toEndPositi
return MIN(duration, self.menuAnimationMaxDuration);
}

@end
@end