天天看点

Xcode9提示"Safe Area Layout Guide before iOS 9.0"

Xcode 9 为iPhone X设计了安全区的概念(Safe Area),支持iOS 9.0以后的设备,编译9.0之前的工程时如果使用了Safe Area,就会报错”Safe Area Layout Guide before iOS 9.0”

同时,使用了安全区,将会自动关闭Top Layout Guide,关闭安全区后即可恢复。

错误图:

Xcode9提示"Safe Area Layout Guide before iOS 9.0"

解决方法:

进入故事版或Xib,属性列表->Interface Builder Document->Use Safe Area Layout Guide,开启或关闭即可。

Xcode9提示"Safe Area Layout Guide before iOS 9.0"