美文网首页
iOS7状态栏重叠

iOS7状态栏重叠

作者: 刘小灰 | 来源:发表于2016-07-23 14:59 被阅读0次

1、在info.plist中新增 View controller-based status bar appearance 项并且将Value设置成 NO 这样状态栏就变成白字了。
2、在AppDelegate.m中加入下面的代码,判断系统版本然后将window的frame下拉20pt。

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {  
        self.window.frame = CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20);   
        [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleLightContent];  
    }

相关文章

网友评论

      本文标题:iOS7状态栏重叠

      本文链接:https://www.haomeiwen.com/subject/zbkwjttx.html