How to add line break for UILabel?

Posted by Harry Pham on Stack Overflow See other posts from Stack Overflow or by Harry Pham
Published on 2010-02-22T17:52:18Z Indexed on 2010/03/14 5:45 UTC
Read the original article Hit count: 691

Filed under:
|
|
|

Let see that I have a string look like this:

NSString *longStr = @"AAAAA\nBBBBB\nCCCCC";  

How do I make it so that the UILabel display the message like this

AAAAA
BBBBB
CCCCC

I dont think, '\n' recognize by UILabel, so is there anything that I can put inside NSString, so that UILabel know that it has to create a line break there? Thank you very much in advance

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uilabel