tags:

views:

51

answers:

2

Would I use a UILabel for that? Or is there something better?

+2  A: 

You can use a UITextView, and write \n where you want the new lines.

Hey!\nHow are you?\n\n\nYOU: I am fine.\nME: That's great! will display:

Hey!
How are you?

YOU: I am fine
ME: That's great!
Emil
You sure you mean /n and not \n? ;-)
Douwe Maan
Whops, sorry. Edited :)
Emil
+4  A: 

It depends on what you want to achieve. If you just want a multi-line label, then you can use UILabel with the numberOfLines parameter set to something other than 1 (set it to zero if you don't care how many lines are used). If you need to let the user edit the text, then a UITextView is the way forward. Line breaks are indicated using the \n character, not the /n sequence as Emil incorrectly wrote.

Graham Lee
Sorry, typo. Edited post.
Emil