Xcode 9.1 警告 "Language directional layout margins before iOS 11.0"
Xcode 9.1 Warns "Language directional layout margins before iOS 11.0"
我注意到 Xcode 警告说:
"Language directional layout margins before iOS 11.0"
甚至这个问题在 Apple developer forum thead.
中也没有得到解答
我使用了故事板,但警告不会导致任何特定视图。
是什么原因或任何解决方案?
我能够找出警告的原因。
在Storyboard -> Size Inspector
中,将Layout Margin
设置为Default
。之前是Language Directional
。
根据文档,对于视图控制器的根视图,UIKit
强制执行一组最小布局边距以确保内容正确显示。当Language Directional
属性中的值小于最小值时,UIKit
使用最小值代替。
我注意到 Xcode 警告说:
"Language directional layout margins before iOS 11.0"
甚至这个问题在 Apple developer forum thead.
中也没有得到解答我使用了故事板,但警告不会导致任何特定视图。
是什么原因或任何解决方案?
我能够找出警告的原因。
在Storyboard -> Size Inspector
中,将Layout Margin
设置为Default
。之前是Language Directional
。
根据文档,对于视图控制器的根视图,UIKit
强制执行一组最小布局边距以确保内容正确显示。当Language Directional
属性中的值小于最小值时,UIKit
使用最小值代替。