Is there a way to change the height of a text field in IB?
If not, what is the proper way to do it in code?
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.
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.