How to vertically align labels
Is there a way to vertically align labels? I understand that you can use height: 'auto'
to make the height auto adjust to the size of the label. This would great except that I need the height of the label to be a certain value. So I figure I have to options. Set the height to 'auto'
and somehow make it have a maximum height OR somehow vertically align the text to top. Is this possible and if so how?
2 Answers
-
Accepted Answer
I would try adding the label to a container view and position the label at top:0 and left:0, then make the container view your desired "maximum size" - I think that would achieve the results you're looking for.
-
Hi,
Not sure if im missing something here.. But have you tried using the top atribute?
I.E
label.createLabel({ height: 'auto', top: 110 });