1、
原文地址:http://blog.csdn.net/yueyeguzhuo/article/details/45310499
Autolayout使用的时候,相信很多童鞋都有这个疑惑,为啥布局里面会有如下的感觉相同的选项呢
NSLayoutAttributeLeft ,
NSLayoutAttributeRight,
NSLayoutAttributeLeading,
NSLayoutAttributeTrailing,
下面来说一下区别:
NSLayoutAttributeLeft 和 NSLayoutAttributeRight 代表从左右进行布局
NSLayoutAttributeLeading和 NSLayoutAttributeTrailing 代表从前后进行布局
但在有些国家地区,NSLayoutAttributeRight和NSLayoutAttributeLeading 是一个效果,布局习惯从右往左
使用推荐:NSLayoutAttributeLeading和 NSLayoutAttributeTrailing (比较常用)
http://stackoverflow.com/questions/19971508/difference-between-nslayoutattributeleft-vs-nslayoutattributeleading
44 | "Leading" is not always means "Left". For RTL-written languages (locales) leading edge of the object’s alignment rectangle will be located at the right side of the object. Quote from Auto Layout Guide:
|