- (Void)viewWillAppear
{
? ? if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)])
? ? { ? ? [self prefersStatusBarHidden];
? ? ?[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
? ?}
}
再添加prefersStatusBarHidden方法
- (BOOL)prefersStatusBarHidden
{
return YES;//隱藏為YES蹋嵌,顯示為NO
}