ios - NSLayoutAttributeLeft 与 NSLayoutAttributeLeading 的区别

标签 ios attributes constraints autolayout

iOS 自动布局中 NSLayoutAttributeLeftNSLayoutAttributeLeading 有什么区别?

最佳答案

“领先”并不总是意味着“左”。 对于 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/

相关文章:

ios - 如何使用 metadataOutputRectOfInterestForRect 方法和 rectOfInterest 属性扫描特定区域? (二维码)

ios - 锁定相机旋转

c# - 在现有文件的详细信息选项卡中添加/编辑新的扩展属性

c# - 如何将方法作为属性参数?

indexing - 不区分大小写的 DB2 UNIQUE 约束

mysql - 主键和外键冲突

ios - 使用 PromiseKit 时如何捕获请求中的错误?

ios - ios使导航栏可单击

javascript - 在 ng-repeat 循环期间或循环后更改属性?

postgresql - 允许冲突的 Postgres 主键