问题描述
我最近升级到xcode 5,当我在iOS模拟器中运行我的应用程序时,启动屏幕重叠状态栏,当你在应用程序的状态栏重叠到我的应用程序的元素,像一个后退按钮我有我的应用程序的左上角。我使用phonegap 2.9构建我的应用程序。任何想法如何让这个渲染正确。
I recently upgraded to xcode 5 and when I run my app in the iOS simulator the splash screen overlaps the status bar and when you are in the app the status bar overlaps onto elements on my app, like a back button I have on the top left hand corner of my app. I build my app using phonegap 2.9. Any ideas how i can get this to render correctly.
b $ b
推荐答案
如果您使用故事板,可以解决此问题,如此问题:
You can resolve this issue if you are using storyboards, as in this question: iOS 7 - Status bar overlaps the view
使用故事板,那么您可以在中的
AppDelegate.m
中使用此代码 done finishlaunching
:
If you're not using storyboard, then you can use this code in your AppDelegate.m
in did finishlaunching
:
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
[application setStatusBarStyle:UIStatusBarStyleLightContent];
self.window.clipsToBounds =YES;
self.window.frame = CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20);
}
另请参阅这个问题:
这篇关于iOS 7状态栏重叠UI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!