报 Safe Area Layout Guide before
2018-05-06 本文已影响1744人
蓝白自由
- Xcode 升级到 Xcode 9 beta, 创建 xib 的时候报了Safe Area Layout Guide before ios 9.0 的错
- 由于项目选择的是最低支持 iOS 8。
-
苹果在 iOS 7 中引入的 Top Layout Guide 和 Bottom Layout Guide, 这些布局指南在 iOS 11 中被弃用,取而代之的是 Safe Area Layout Guide.
-
Top and Bottom Layouts Guides
当一个 Viewcontroller 被嵌入到 Navigationcontroller and tab bar 中时,我们可以使用 Top Layout Guide和Bottom Layout Guide 让view根据上下锚点自适应内容 如图所示:
- Safe Area Layout Guide
在 iOS 11 中苹果用单独的 Safe Area 属性代替了上面的属性.
安全区域限制于顶部和底部的锚点如图