//添加监听
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(setNeedsStatusBarAppearanceUpdate) name:UIWindowDidBecomeHiddenNotification object:nil];
重写状态栏隐藏方法
- (BOOL)prefersStatusBarHidden {
return UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation);
}