Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change textfield height for an ipad using interface builder?

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?

like image 226
Fangy Avatar asked Nov 29 '22 05:11

Fangy


1 Answers

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 call textField.borderStyle = UITextBorderStyleRoundedRect in my viewDidLoad method.

Of course, textField should be the name of the UITextField IBOutlet.

like image 57
Julian Osorio Avatar answered Dec 06 '22 23:12

Julian Osorio