Problems setting the layout in Xcode

1

I'm having difficulty on the following question. The blue button in the image below has to be waist-high as it is on the storyboard, but it has to be on all iPhones (4 "up). As can be seen in the preview, for each screen size the button stays

Thank you.

    
asked by anonymous 11.04.2016 / 03:49

2 answers

2

How @danielbmarques said should work:

  

• leading and trailing on borders

  

•centralizedvertical:

  

•selectstheconstraintandadjuststhemultiplier:

  

•Expectedresult:

    
13.04.2016 / 20:26
1

Pro button to stay in a proportional size, instead of creating constraints pro its size, creates constraints pro leading and trailing. So the edges of it will be the same distance from the sides of the iPhone.

Pro vertical alignment is proportional, instead of choosing a distance, puts the button centrally vertically, selects the constraint and plays with the multiplier value until the button is in the position you want.

Edit: Now that I'm thinking, I do not know if leading and trailing will work ... you can also set the width of the button equal to the width of the screen, and then manipulate the multiplier of this constraint to make the button bigger or smaller .

    
11.04.2016 / 05:15