user134721
user134721

Reputation: 47

Need help with UIText

I'm trying to make it so that the text displays like

Alabama Alaska Arkansas and so on.

I mostly just need help on how to make it go to the next line of text

lblText.text = @"Alabama:";

i tried doing @"Alabama:" @"alaska:";

but it didn't work.

Any thoughts?

Upvotes: 0

Views: 413

Answers (2)

marcc
marcc

Reputation: 12399

If you don't want to use UITextView as recommended, you can continue to use your UILabel and set lblText.numberOfLines = 0; to make it multiline.

You'll still need to take the previous advice and put a \n between each State Name.

Upvotes: 0

oxigen
oxigen

Reputation: 6263

Use UITextView

UITextView *textView;
.......
textView.text = @"Alabama \nAlaska \nArkansas";

Upvotes: 1

Related Questions