我正在制作一个滑动菜单。但是当我滑动打开和滑动关闭时,前视图控制器的导航栏与系统状态栏重叠。
if (should_hide_status_bar)
{
[[UIApplication sharedApplication] setStatusBarHidden:is_going_to_open withAnimation:(UIStatusBarAnimationSlide)];
}
[UIView animateWithDuration:DURATION delay:0 usingSpringWithDamping:2 initialSpringVelocity:1 options:(0) animations:^
{
CGFloat disp0 = state == AASlideViewControllerSlidingStateClose ? 0 : OPEN_X_POS;
CGAffineTransform t1 = CGAffineTransformMakeTranslation(disp0, 0);
self.frontViewController.view.transform = t1;
}
completion:^(BOOL finished)
{
self->_flags.is_sliding = NO;
self.view.userInteractionEnabled = YES;
}];
如何解决这个问题?