views:

1715

answers:

3

I have a simple app with a UITextView embedded into a UIScrollView. Interface Builder won't let me add multiple newlines for spacing; when I hit return it sees that as "end of input" rather than appending the newline to the UITextView.

How can I get it to accept newlines for spacing?

+3  A: 

Write up your text in TextEdit, then copy/paste it in.

sbwoodside
Ah, so simple. I used emacs, thanks.
Caffeine Coma
+2  A: 

As sbwoodside said, a text editor is the easiest way.

That said, ff you need more control, or it isn't quite working, don't use IB. Ideally, if you need any type of formatting for a long sting of text, do it programmatically.

Formatting in IB is horrible. I tried to add some "terms and conditions" in a UITextView and it was a real pain.

In the end it is easier than messing with IB...

Corey Floyd
+9  A: 

Much simpler (and more IB based) than previous answers: Just ALT+ENTER. It will send a newline to the UITextView.

Aviad Ben Dov