Tutorial :iPhone UITextField: how to insert new line by the return key?


I want to get a carriage return/new line by hitting the return key on an UITextField's keyboard. I've found out, that textFieldShouldReturn gets called.

But how do I insert a carriage return in the text field?


You want to use a UITextView instead. UITextFields are meant for single line input whereas UITextViews support multi-line input.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »