gpt4 book ai didi

ios - NSLayoutAttributeLeft 与 NSLayoutAttributeLeading 的区别

转载 作者:IT王子 更新时间:2023-10-29 07:33:34 24 4
gpt4 key购买 nike

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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com