How to make a new line in UITextView in nib/storyboard?

t3hcakeman picture t3hcakeman · Jan 26, 2012 · Viewed 35.1k times · Source

I am trying to make a new line in Xcode 4.2 UITextView, and when I do alt+return, it goes to the next line, but does not show up when built and ran.

Answer

Graham Perks picture Graham Perks · Jan 26, 2012

This works, I'm unsure what you are doing differently.

  • Drag out a UITextView.
  • Double-click it to edit text, place cursor where you want the paragraph break.
  • Option-Enter a couple of times to create a blank line & paragraph.

The paragraph shows at runtime. There's also a Text attribute that can be edited in the Attributes inspector.