diff --git a/MMDrawerController/MMDrawerController.m b/MMDrawerController/MMDrawerController.m index 4aec238b..e5af3fc0 100644 --- a/MMDrawerController/MMDrawerController.m +++ b/MMDrawerController/MMDrawerController.m @@ -945,8 +945,8 @@ -(void)setShowsStatusBarBackgroundView:(BOOL)showsDummyStatusBar{ _showsStatusBarBackgroundView = showsDummyStatusBar; CGRect frame = self.childControllerContainerView.frame; if(_showsStatusBarBackgroundView){ - frame.origin.y = 20; - frame.size.height = CGRectGetHeight(self.view.bounds)-20; + frame.origin.y = [UIApplication sharedApplication].statusBarFrame.size.height; + frame.size.height = CGRectGetHeight(self.view.bounds)-[UIApplication sharedApplication].statusBarFrame.size.height; } else { frame.origin.y = 0; @@ -1022,7 +1022,7 @@ -(UIView*)childControllerContainerView{ -(UIView*)dummyStatusBarView{ if(_dummyStatusBarView==nil){ - _dummyStatusBarView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), 20)]; + _dummyStatusBarView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), [UIApplication sharedApplication].statusBarFrame.size.height)]; [_dummyStatusBarView setAutoresizingMask:UIViewAutoresizingFlexibleWidth]; [_dummyStatusBarView setBackgroundColor:self.statusBarViewBackgroundColor]; [_dummyStatusBarView setHidden:!_showsStatusBarBackgroundView];