What is the best way to display a formatted NSString? I’m trying to format the choices for a multiple choice question on an app.
choices1 = [NSString stringWithFormat:@"\n\n Blue \n\n"
"Yellow \n\n"
"Red \n\n"
"Orange \n\n"];
I want to display that on the iPhone screen. I tried using UILabel but it doesn’t recognize the new line characters. (It prints the words though).
should look like this:
Blue
Yellow
Red
Orange
Thoughts? Thanks.
UILabel defaults to single-line display. If you want multiple lines, set
numberOfLinesto 0, for unlimited lines, or to whatever number of lines you want to cap the label at.