santibernaldo
santibernaldo

Reputation: 835

Height of UIViews proportional to height of Screen (Auto Layout)

I would like to make the height of the UITextFields and one UIButton I have into my view proportional when the height of the screen changes. The default height of the textfields and uibutton is 55, but I realised that in iPhone 4, this height doesn't fit propertly the screen.

How would you approach this thing with Auto Layout?

iPhone 4.7 inch

enter image description here

iPhone 4.5 inch

enter image description here

Thanks!

Upvotes: 0

Views: 74

Answers (1)

jcaron
jcaron

Reputation: 17720

I'm definitely not sure changing the height of textfields is the right approach to addressing your layout issues, but if you actually want to do so, it's as simple as creating an "Equal Height" constraint between your textfield and the view, and changing the multiplier so you get the value you want.

Upvotes: 1

Related Questions