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

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

问题描述

我无法确定如何调整 iOS7 中的状态栏.我的视图控制器有一个 tableView,我希望 tableView 在状态栏下启动.目前,它被状态栏覆盖.(顶部的标签是tableView中的一个headerView).

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的Extend Edges部分勾选Under Top Bars"和Under Opaque Bars".

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

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

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