Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITextField multiple lines [duplicate]

Just wonder if it is possible to use multiple lines in UITextField in XCode. I know how to increase the height size. but have know idea about its lines :/

like image 642
Rudi Avatar asked Nov 20 '12 15:11

Rudi


1 Answers

Ok I did it with some trick ;) First made a UITextField and increased it's size like this:

var frameRect: CGRect = textField.frame
frameRect.size.height = 53
textField.frame = frameRect

Then I made a UITextView exactly in the same area that I made my UITextField, and deleted its background colour. Now it looks like that I have a multiple lines TextField!

like image 81
Rudi Avatar answered Oct 21 '22 19:10

Rudi