Difference between NSLayoutAttributeLeft and NSLayoutAttributeLeading

What is the difference between NSLayoutAttributeLeft and NSLayoutAttributeLeading in iOS autorun?

+55
ios autolayout attributes constraints
Nov 14 '13 at 7:00
source share
1 answer

Leading does not always mean left. For RTL-written languages ​​(locales), the leading edge of the alignment rectangle of objects will be located on the right side of the object.

Quote from the auto-layout guide :

Attributes leading and ending are the same as left and right for languages ​​from left to right, such as English, but in an environment from right to left, such as Hebrew or Arabic, leading and ending are the same as right and left. When you create constraints, leading and ending values ​​are the default values. Usually, you should use the leading and the final to ensure that your interface is correctly placed in all languages, unless you create restrictions that should remain unchanged regardless of the language (for example, the order of the main and detailed panels in split mode).

+79
Nov 14 '13 at 7:18
source share



All Articles