iOS11,Xcode 9.0 报错,Safe Area Layout Guide Before iOS 9.0
来源:互联网 发布:mysql 自动记录时间 编辑:程序博客网 时间:2024/06/05 17:36
升级到Xcode9之后,新建了一个工程,报错:
Safe Area Layout Guide Before iOS 9.0
iOS 7 之后苹果给 UIViewController 引入了 topLayoutGuide 和 bottomLayoutGuide 两个属性来描述不希望被透明的状态栏或者导航栏遮挡的最高位置(status bar, navigation bar, toolbar, tab bar 等)。这个属性的值是一个 length 属性( topLayoutGuide.length)。 这个值可能由当前的 ViewController 或者 NavigationController 或者 TabbarController 决定。
一个独立的ViewController,不包含于任何其他的ViewController。如果状态栏可见,topLayoutGuide表示状态栏的底部,否则表示这个ViewController的上边缘。
包含于其他ViewController的ViewController不对这个属性起决定作用,而是由容器ViewController决定这个属性的含义:
如果导航栏(Navigation Bar)可见,topLayoutGuide表示导航栏的底部。
如果状态栏可见,topLayoutGuide表示状态栏的底部。
如果都不可见,表示ViewController的上边缘。
这部分还比较好理解,总之是屏幕上方任何遮挡内容的栏的最底部。
iOS 11 开始弃用了这两个属性, 并且引入了 Safe Area 这个概念。苹果建议: 不要把 Control 放在 Safe Area 之外的地方
// These objects may be used as layout items in the NSLayoutConstraint API @available(iOS, introduced: 7.0, deprecated: 11.0) open var topLayoutGuide: UILayoutSupport { get } @available(iOS, introduced: 7.0, deprecated: 11.0) open var bottomLayoutGuide: UILayoutSupport { get }
解决办法有两种:
1、在报错的Main.storyboard和LanunchScreen.storyboard如下标记位置去掉安全区域默认的勾选
2、在工程最低版本要求中改为9.0
- iOS11,Xcode 9.0 报错,Safe Area Layout Guide Before iOS 9.0
- Xcode 9.0 报错, Safe Area Layout Guide Before IOS 9.0
- Xcode 更新到9.0 新建xib报错: Safe Area Layout Guide Before IOS 9.0
- Xcode 9.0 报错, Safe Area Layout Guide Before IOS 9.0
- safe area layout guide before ios 9.0
- safe area layout guide before ios 9.0
- 【iOS】Safe Area Layout Guide before iOS 9.0
- [iOS] Safe Area Layout Guide before iOS 9.0
- Xcode 9 illegal Configuration Safe Area Layout Guide before iOS 9.0
- Xcode 9 illegal Configuration Safe Area Layout Guide before iOS 9.0
- xcode9 safe area layout guide before ios 9.0问题
- Xcode9提示"Safe Area Layout Guide before iOS 9.0"
- iPhoneX适配篇 && Safe Area Layout Guide Before IOS 9.0
- iOS Xcode9 Safe Area Layout Guide Before iOS9.0报错解决
- iOS开发中,illegal configuration Safe Area Layout Guide before iOS 9.0
- Xcode9出现错误safe area layout guide before ios 9
- Xcode9 Safe Area Layout Guide Before iOS9.0报错解决
- Safe Area Layout Guide before ios9.0
- Angular4笔记(二)
- Google Play 开发者平台的 【登录】,【上传图片】,【上传APK】失败的问题
- 数据挖掘简介
- python中使用xlrd、xlwt操作excel表格详解
- 移动端rem适配(手淘flexible方案)
- iOS11,Xcode 9.0 报错,Safe Area Layout Guide Before iOS 9.0
- jenkins 视图
- 初识react-native Featch和AsyncStorage
- 爬坑日记--------vue之弹出框传值问题
- VC++文件操作之最全篇
- vue.js中的列表渲染(循环渲染)(v-for)
- Jquery遍历
- cmake 配置交叉编译工作记录
- List自定义排序根据Collections.sort重载方法来实现