iOS系统隐藏状态栏。
在plist里设置:
首先设置key:
Status bar is initially hidden = YES
然后设置key:
View controller-based status bar appearance = NO
ViewController:
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
// iOS 7
self.isStatusBarVisible = YES;
[self prefersStatusBarHidden];
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
}
- (BOOL)prefersStatusBarHidden
{
return !self.isStatusBarVisible;
}