- (Void)viewWillAppear
{
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)])
{ [self prefersStatusBarHidden];
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
}
}
再添加prefersStatusBarHidden方法
- (BOOL)prefersStatusBarHidden
{
return YES;//隐藏为YES,显示为NO
}