How to get UITextView to respect newlines in Interface Builder?

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?


Solution 1:

Much simpler (and more IB based) than previous answers:

Just Alt + ENTER It will send a newline to the UITextView.

Solution 2:

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

Solution 3:

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...

Solution 4:

In IB Shift+Alt (Option)+Enter is as New paragraph