UIApplication

2016-08-10  本文已影响1人  CoderRH
   /** 隐藏状态栏*/
   - (BOOL)prefersStatusBarHidden{
       return YES;
   }

   /** 状态栏的风格*/
   - (UIStatusBarStyle)preferredStatusBarStyle{
     return UIStatusBarStyleLightContent;
}
   - (void)statusHidden{
       UIApplication *app = [UIApplication sharedApplication];
    
       // 隐藏状态栏
       [app setStatusBarHidden:YES];
       //带动画隐藏
       [app setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
    
        //设置状态栏的风格
        [app setStatusBarStyle:UIStatusBarStyleLightContent];
}

上一篇下一篇

猜你喜欢

热点阅读