Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dividing screen in to 1/3 and 2/3 views using autolayout

Is there a way to divide the screen by percentage (not equal percentage) I need to split the screen to two parts 1/3 and 2/3. I know how to split to equal parts but cant figure out how to split to non equal.

Thanks

like image 218
ilan Avatar asked Jul 07 '15 06:07

ilan


1 Answers

Xcode contraints

Make an "Equal widths" constraints between your view and the super view with multiplier 2:3 for one view and 1:3 for the other. See picture. "Equal height" if you want to split in the other direction.

like image 180
Stefan Avatar answered Oct 14 '22 02:10

Stefan