公告
财富商城
积分规则
提问
发文
2019-03-14 11:17发布
对你真心纯属浪费
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?
In the attribute inspector of your textField you can select the first, second and third Border Styles to increase the height.
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.
Step 1 : Click the Attribute Inspector, Select the Border Styles which is not the rounded one.
Border Styles
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().
@IBOutlet
viewWillAppear()
viewDidAppear()
userTextField.borderStyle = UITextBorderStyle.roundedRect
Now you'll get the cool rounded textfield.
最多设置5个标签!
In the attribute inspector of your textField you can select the first, second and third Border Styles to increase the height.
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.
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 theviewWillAppear()
orviewDidAppear()
.Now you'll get the cool rounded textfield.