Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between NSLayoutAttributeBaseline and NSLayoutAttributeBottom?

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

like image 322
Matt Avatar asked Feb 14 '13 20:02

Matt


2 Answers

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.

like image 171
rmaddy Avatar answered Nov 19 '22 17:11

rmaddy


NSLayoutAttributeBaseline

NSLayoutAttributeBottom

like image 32
coolbeet Avatar answered Nov 19 '22 16:11

coolbeet