How to make a UILabel which adjusts it's text to the upper left?
Posted
by mystify
on Stack Overflow
See other posts from Stack Overflow
or by mystify
Published on 2010-05-17T16:32:29Z
Indexed on
2010/05/17
16:40 UTC
Read the original article
Hit count: 146
For some strange reason, in iPhone OS 3.0 this doesn't work: I made a big fullscreen UILabel with numberOfLines = 0
and baselineAdjustment = UIBaselineAdjustmentNone
.
It refuses to show the text in the upper left. It's always in the center of the bounding box, aligned to the left.
The documentation says:
UIBaselineAdjustmentNone Adjust text relative to the top-left corner of the bounding box. This is the default adjustment. Available in iPhone OS 2.0 and later.
Probably a framework bug? I started with shiny new labels to test it. Text is centered.
© Stack Overflow or respective owner