之前是用xcode8.3.3创建的工程最近升级到Xcode9.0 遇见了这个问题

在Xcode 9.0以上 新建xib文件会报错 xx.xib: error: Illegal Configuration: Safe Area Layout Guide before iOS 9.0

是因为在iOS 11上安全距离的变化引起的解决办法如下图:(以UITableViewCell.xib为例)

xx.xib: error: Illegal Configuration: Safe Area Layout Guide before iOS 9.0报错问题解决

按照下图的标示操作

xx.xib: error: Illegal Configuration: Safe Area Layout Guide before iOS 9.0报错问题解决

 

xx.xib: error: Illegal Configuration: Safe Area Layout Guide before iOS 9.0报错问题解决

再次编译项目就OK了!

相关文章: