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

查看:30
本文介绍了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.

推荐答案

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

You can resolve this issue if you are using storyboards, as in this question: iOS 7 - Status bar overlaps the view

如果您不使用故事板,那么您可以在 did finishlaunching 中的 AppDelegate.m 中使用此代码:

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天全站免登陆