设置导航栏动态隐藏和显示

1.在项目的info.plist中添加key:

View controller-based status bar appearance    Boolean:NO

2.添加代码

   [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];

判断当前statusBar状态:

 [UIApplication sharedApplication].statusBarHidden

你可能感兴趣的:(设置导航栏动态隐藏和显示)