Basically, this is what happens when I click on the left menu button.
https://i.stack.imgur.com/g7uq6.png
I want it to appear under the status bar and not to overlap it.
Here's the code:
HomeViewController.m
-(void)menuBarButtonItemClick{
mJUserAccountMenuViewController = nil;
mJUserAccountMenuViewController = [[MJUserAccountMenuViewController alloc] initWithNibName:@"MJUserAccountMenuViewController" bundle:nil];
mJUserAccountMenuViewController.delegate = self;
[self presentPopupViewController:mJUserAccountMenuViewController animationType:MJPopupViewAnimationSlideLeftRight];
}
mJUSerAccountMenuViewController.m
- (void)viewDidLoad
{
[super viewDidLoad];
leftMenuArrayy = [StaticDataCollection getSharedInstance].accountMenuArray;
backTOHomelabl.font = FONT_APP_DEFAULT_FONT;
backTOHomelabl.textColor = COLOR_WHITE_COLOR;
if (IS_IPHONE_5_SCREEN) {
[self.view setFrame:CGRectMake(0, 0, 250, 568)];
} else {
[self.view setFrame:CGRectMake(0, 0, 250, 480)];
}
}
If you are using
storyboard
andAutoLayout
, you can set the top of menu equalstop layout guide
.If you're using
xib
, you can setiOS 6/7 Delta
to plus or minus y offset 20(Status bar's height).If you set layout by code, you have to check the version of iOS. For example: