iOS的7 - 调整状态栏 [英] iOS 7 - adjusting for status bar

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

问题描述

我无法确定如何调整在iOS7状态栏。我的视图控制器有一个的tableView ,我想在的tableView 状态栏下启动。目前,它是由状态栏重叠。 (顶部的标签是 headerView 的tableView )。

I am having trouble determining how to adjust for the status bar in iOS7. My view controller has a tableView, and I want the tableView to start under the status bar. Currently, it is being overlapped by the status bar. (The label at the top is a headerView in the tableView).

我已经设置为通过IB我的视图控制器的属性如下:

I have set the properties on my view controller via IB as follows:

automaticallyAdjustsScrollViewInsets = YES
edgesForExtendedLayout = UIRectEdgeNone

是为状态栏重叠的tableView这些设置预期的行为?还是我失去了一些东西?我曾尝试启用自动布局,改变项目设置为仅支持iOS的7。

Is the expected behavior for these settings for the status bar to overlap the tableView? Or am I missing something? I have tried enabling auto-layout, and changing the project settings to only support iOS 7.

推荐答案

解决方法就是在IB的扩展边缘部分,检查根据热门酒吧和不透明下栏。

The solution is to check "Under Top Bars" and "Under Opaque Bars" in the Extend Edges section of IB.

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

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