美文网首页
【code_hyy_基础】SafeArea安全区域的理解?

【code_hyy_基础】SafeArea安全区域的理解?

作者: Hyyqinfen | 来源:发表于2018-11-05 18:53 被阅读0次
安全区域的理解

SafeArea是View的属性,是iOS11出来用来代替bottomLayoutGuide/topLayoutGuide的,bottomLayoutGuide/topLayoutGuide是ViewController的属性;
从这里可以看出,SafeArea更灵活,可以对每一个View进行配置;
他们都是让控件不被父View遮挡系统自动计算的距离,你当然也可以关闭这个功能;
iOS11前用automaticallyAdjustsScrollViewInsets,
iOS11后用contentInsetAdjustmentBehavior。

相关文章

网友评论

      本文标题:【code_hyy_基础】SafeArea安全区域的理解?

      本文链接:https://www.haomeiwen.com/subject/qpymtqtx.html