iOS 7状态栏重叠UI [英] iOS 7 status bar overlapping UI

查看:212
本文介绍了iOS 7状态栏重叠UI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近升级到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

推荐答案

如果您使用故事板,可以解决此问题,如此问题: iOS 7 - 状态栏与视图重叠

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);
}

另请参阅这个问题:在IOS7中的状态栏和导航栏问题

这篇关于iOS 7状态栏重叠UI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆