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

}


或者设置plist文件全局

设置key:Status bar is initially hidden    YES

设置key:View controller-based status bar appearance   NO



评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!