UIStoryBoard-防止视图重叠状态栏(iOS 11 App) [英] UIStoryBoard - Prevent View from overlapping status bar (iOS 11 App)

查看:42
本文介绍了UIStoryBoard-防止视图重叠状态栏(iOS 11 App)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想停止视图与状态栏的重叠

I want to stop overlapping of my View with statusbar

推荐答案

使用自动布局"并将视图固定到顶部布局指南",或使用新的安全区域布局指南".要启用它,请在情节提要的文件"检查器中选中以下选项.

Use Auto Layout and pin your view to Top Layout Guide, or use the new Safe Area Layout Guides. To enable it, in your storyboard's File inspector tick the following option.

作为示例,我使用了灰色图像视图:

As an example I have used gray image view:

如下所示,它与状态栏不重叠:

As you can see below, it does not overlap status bar:

这篇关于UIStoryBoard-防止视图重叠状态栏(iOS 11 App)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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