We're using Interface Builder for developing an app for the iPad and we can't figure out how to increase the height of the textfields.
When we were using IB to develop an application for osx, you could go to the textfields attributes and under the control section you could set line break to word wrap instead of clip.
When we try to use Interface Builder for iPad applications though, it doesn't have the option of changing linebreak style under attributes-->control.
Is there any way to set the height using Interface Builder or do you have to set that in the code?
there is a wrapping text field,that is what you need.
It looks like the height of the rounded-style text field is locked in Interface Builder. My solution was to use another of the
UITextField
styles in my XIB and then calltextField.borderStyle = UITextBorderStyleRoundedRect
in myviewDidLoad
method.Of course,
textField
should be the name of theUITextField IBOutlet
.set the frame of ui textfield object in view did load but it will involve coding
You can edit the height of any UITextfield in IB.Just set the constraint in IB.Select the constraint.In the Size Inspector-->Select and Edit just change the constant to your desired value.Press Enter ...Done!!!! (Can't get multiline though)
iOS
UITextField
s are single line only and have a fixed height.If you want a multi-line, variable-height text entry field then use
UITextView
.1 - Right click on your storyboard/xib file and select "Open as" -> "Source code".
2 - Find the xml tag relative to your TextField, e.g.
3 - Change the
height
value to what you want (e.g. 50)4 - Right click again on you storyboard and select "Open as" -> "Interface builder"
5 - See the result