How to create a multiline UITextfield?

raaz picture raaz · Aug 28, 2009 · Viewed 303k times · Source

I am developing an application where user has to write some information. For this purpose I need a UITextField which is multi-line (in general UITextField is a single line).

As I'm Googling I find a answer of using UITextView instead of UITextfield for this purpose.

Answer

h4xxr picture h4xxr · Aug 28, 2009

UITextField is specifically one-line only.

Your Google search is correct, you need to use UITextView instead of UITextField for display and editing of multiline text.

In Interface Builder, add a UITextView where you want it and select the "editable" box. It will be multiline by default.