状态栏调整 :
渲染的非常好
不是 完全隐藏, 是状态栏 背景 隐藏。
- (void)viewDidLoad {
[super viewDidLoad];
[self.navigationController setNavigationBarHidden: YES ];
}
#pragma mark - 视图的 生命周期
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear: animated ];
self.automaticallyAdjustsScrollViewInsets = NO;
[self.navigationController.view sendSubviewToBack: self.navigationController.navigationBar ];
}
状态栏隐藏:
pragma mark - 视图的 生命周期
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear: animated ];
if ( [self respondsToSelector: @selector(setNeedsStatusBarAppearanceUpdate) ]){
[self prefersStatusBarHidden ];
[self performSelector: @selector(setNeedsStatusBarAppearanceUpdate) ];
}
}
- (BOOL)prefersStatusBarHidden{
return YES;
}