Ivan Cantarino
Ivan Cantarino

Reputation: 3246

iOS - increase UITextField height based on its content

I've a collection view that has on its header some views as user inputs.

In one of them I've something like a Biography textField, but when I'm typing the text continues all the way to the left, and what I'm trying to achieve is that when the text reaches the visible end, it goes to a new like and so it increases its own height.

How can I achieve this?

header

I want the Bio text field to increase its height based on its text and not stay the same height and the text goes all the way long to the left.

Regards ;)

Upvotes: 1

Views: 2043

Answers (1)

Vladyslav Zavalykhatko
Vladyslav Zavalykhatko

Reputation: 17354

UITextField is one-line only element. You can try UITextView instead

EDITED

I've never done this, but this thread seems to do something like dynamic size with UITextView

Upvotes: 1

Related Questions