0

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)];
    }
}
Ryan
  • 4,799
  • 1
  • 29
  • 56
Mahesh De Silva
  • 505
  • 8
  • 20

1 Answers1

0

If you are using storyboard and AutoLayout, you can set the top of menu equals top layout guide.

If you're using xib, you can set iOS 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:

if([[[UIDevice currentDevice] systemVersion] integerValue] >= 7)
{
    // set the subviews' offset +20px(statusBar's height)
}
Ryan
  • 4,799
  • 1
  • 29
  • 56