How to change height of text field? How to change height of text field? ios ios

How to change height of text field?

Click the attribute inspector for the textField and then change the Border style to second one and you will be able to change the height.

enter image description here

Step 1 : Click the Attribute Inspector, Select the Border Styles which is not the rounded one.


Step 2 : Now go to Size Inspector and change the size of the TextField.

change the height of the textfield

Step 3 : Create an @IBOutlet for TextField and then add below code inside the viewWillAppear() or viewDidAppear().

userTextField.borderStyle = UITextBorderStyle.roundedRect

Swift 4.2

userTextField.borderStyle = UITextField.BorderStyle.roundedRect

Now you'll get the cool rounded textfield.

Change to square border style and then go back to rounded border and it will stay the same. This works for xCode 11.0