iOS 自动布局中 NSLayoutAttributeLeft
和 NSLayoutAttributeLeading
有什么区别?
最佳答案
“领先”并不总是意味着“左”。 对于 RTL 编写的语言(语言环境),对象对齐矩形的前沿将位于对象的右侧。
引自 Auto Layout Guide :
The attributes leading and trailing are the same as left and right for left-to-right languages such as English, but in a right-to-left environment such as Hebrew or Arabic, leading and trailing are the same as right and left. When you create constraints, leading and trailing are the default values. You should usually use leading and trailing to make sure your interface is laid out appropriately in all languages unless you’re making constraints that should remain the same regardless of language (such as the order of master and detail panes in a split view).
关于ios - NSLayoutAttributeLeft 与 NSLayoutAttributeLeading 的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19971508/