xcode 9中xib的安全区域是什么? [英] What is safe area in xib in xcode 9?

查看:315
本文介绍了xcode 9中xib的安全区域是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你可以告诉我xcode 9中xibs中的安全区域(图中突出显示)是什么用的?

Can you please let me know what is safe area (highlighted in image) in xibs in xcode 9. and what is use of this?

推荐答案

安全区域是一个布局指南。
布局指南,表示视图中不受条形和其他内容影响的部分。在iOS 11中,Apple正在弃用顶部和底部布局指南,并用一个安全区域布局指南替换它们。

Apple引入了topLayoutGuide和bottomLayoutGuide作为UIViewController在iOS 7中的属性。它们允许您创建约束以防止您的内容被状态,导航或标签栏等UIKit栏隐藏。这些布局指南在iOS 11中已弃用,并由单个安全区域布局指南取代。

Apple introduced the topLayoutGuide and bottomLayoutGuide as properties of UIViewController way back in iOS 7. They allowed you to create constraints to keep your content from being hidden by UIKit bars like the status, navigation or tab bar. These layout guides are deprecated in iOS 11 and replaced by a single safe area layout guide.

这篇关于xcode 9中xib的安全区域是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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