Gerd Castan
Gerd Castan

Reputation: 6849

Apple Watch: how to align two labels at baseline with different font sizes?

On an apple watch, how do I align two labels at baseline with different font sizes?

look at the red and blue labels, they are not aligned at baseline.

align at baseline align at baseline

This is the structure of the first image in the interface builder:

horizontal group
    label with big font and Baseline=Align Baseline; Alignment vertical=Center
    label with small font and Baseline=Align Baseline; Alignment vertical=Center

This is the structure of the second image in the interface builder:

horizontal group
    label with big font and Baseline=Align Baseline; Alignment vertical=Bottom
    label with small font and Baseline=Align Baseline; Alignment vertical=Bottom

in the first image, the label with the small font is way too high, in the second image, the label with the small font is a little too low.

How can I make them align exactly at the base line?

Upvotes: 2

Views: 786

Answers (1)

tc333
tc333

Reputation: 109

If you're using interface builder, just ctrl + drag from one label to the other and select 'Baseline' to set an align baseline constraint.

Upvotes: -1

Related Questions