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
2010-05-15 13:29:16
You sure you mean /n and not \n? ;-)
Douwe Maan
2010-05-15 13:53:32
Whops, sorry. Edited :)
Emil
2010-05-15 16:56:41
+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
2010-05-15 13:45:57