Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift Text Field wrap to new line

I'm working on a swift project and have a Text Field. The user can input a string into this field. Currently if the user types too much then the string scrolls horizontally on the one line. How do I build a text field where once the first line is full it adds a line.

aaaaaaaaaaaaaaaaaaaaaaaaa

vs.

aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaa
like image 388
Marcus Avatar asked Mar 15 '15 03:03

Marcus


1 Answers

UITextField is one-line only.

You can replace your UITextField with UITextView in your storyboard. They are editable and selectable by default.

like image 172
LooraMoora Avatar answered Oct 29 '22 20:10

LooraMoora