Let see that I have a string look like this:
NSString *longStr = @\"AAAAA\\nBBBBB\\nCCCCC\";
How do I make it so that the UILabel disp
If your using a UILabel
you have to remember that the default setting is 1 line, so it does not matter how many breaks you add (\n
or \r
), you need to make sure it is set to more than one line so it could be allowed to append more lines.
One alternative is to use UITextView
which is really meant for multilines.
You can easily achieve this in XCode attribute section of the UILabel, see screenshot: