0

In iOS project, I am creating an UILabel with 2 lines of text capacity, and i specified that the UILabel can content 2 lines. If the text only is 1 line, how can specify that the text is writing in the second line and the first be empty?

In other words, i would like that the text was writing in the UILabel from bottom to top.

Specifications:

The UILabel must be 2 lines maxium bigger.

If the text only needs 1 line of UILabel, the line which should be write is the second

If the text needs 2 lines, the UILabel should be completed first with the first line and then the second line.(normally. it works)

Thanks.

ValentiGoClimb
  • 750
  • 3
  • 13
  • 23
  • 1
    possible duplicate of [Vertically align text within a UILabel](http://stackoverflow.com/questions/1054558/vertically-align-text-within-a-uilabel) – Jon Grant Aug 08 '12 at 11:31
  • Even if this is not a duplicate I strongly suggest that you at least read the question linked by @JonGrant, it's very informative and should put you on the right track. – Keab42 Aug 08 '12 at 16:06

1 Answers1

0

Use :

label.lineBreakMode = UILineBreakModeWordWrap;
label.numberOfLines = 0;
parilogic
  • 1,147
  • 9
  • 26