Reputation: 63
I am new to iOS and i want to set constraints to 3 buttons like following image.
First i want to set Background view (Green colour) = (0, 100, device width, 150);
then 3 buttons on the Background view (buttons are subviews of Background view).
Buttons height and width is fix i.e., 100 and 100.
Space between the buttons is 50 and buttons y position is 5
please help me to set constraints, the following image illustrate the Design. Thanks in advance
Upvotes: 0
Views: 376
Reputation: 1790
A bit tricky to explain, but I'll try, so select button2 and click the pin option and add the five constaints.
The select button1, add the following constaints and repeat for button3.
Finally you can align button2 to center horizontially.
Hope that helps, also read through the link Ulli posted, it's a good one, good luck.
Upvotes: 2