ios 隐藏状态栏,时间
时间:2014-04-29 13:44:20
收藏:0
阅读:432
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
// iOS 7
[self prefersStatusBarHidden];
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
}
- (BOOL)prefersStatusBarHidden
{
return YES;//隐藏为YES,显示为NO
// iOS 7
[self prefersStatusBarHidden];
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
}
- (BOOL)prefersStatusBarHidden
{
return YES;//隐藏为YES,显示为NO
}
或者设置plist文件全局
设置key:Status bar is initially hidden YES
设置key:View controller-based status bar appearance NO
评论(0)