What is the difference between NSLayoutAttributeBa

2020-06-08 13:17发布

问题:

The Apple docs usefully state that NSLayoutAttributeBaseline aligns to "The object’s baseline". What's a baseline? How is that different from the bottom?

回答1:

Baseline applies to views such as UILabel. The baseline would be the position where the bottom of uppercase letters appear. For most other views (if not all others) the baseline and the bottom are the same.



回答2:

NSLayoutAttributeBaseline

NSLayoutAttributeBottom