xcode升级到Xcode5 在ios7运行 程序的状态栏StatusBar消失了,现在有解决办法了
1.在appdeletage里面 添加如下代码:
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
self.window.frame = CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20);
}
2.在info.plist文件里面 属性:View controller-based status bar appearance 值设为NO
接着运行程序,可以看到StatusBar了
1.在appdeletage里面 添加如下代码:
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
self.window.frame = CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20);
}
2.在info.plist文件里面 属性:View controller-based status bar appearance 值设为NO
接着运行程序,可以看到StatusBar了
文章详细介绍了如何通过修改代码和配置信息.plist文件来解决在使用Xcode5升级到iOS7系统时,程序状态栏StatusBar消失的问题。通过在appdelegate中添加特定代码,并将Viewcontroller-basedstatusbarappearance属性设为NO,在info.plist文件中进行相应设置,可以成功使状态栏重新显示。
1万+

被折叠的 条评论
为什么被折叠?



