Reputation: 131
Trying to accomplish the layout below using Auto Layout and settings constraints.
The layout itself is comprised of four UIViews (top and bottom ones occupying the full width of the screen, the two middle ones side by side each taking half the width).
However, after many tutorials on Auto Layout and Setting constraints, the closest I can get to my desired result is the two images below:
OR
I've played with the constraints of all the individuals views until all orange and red marks/lines disappeared and only blue ones remained, but I cannot get to the desired result.
Any ideas how this can accomplished using Auto Layout and constraints?
Upvotes: 1
Views: 93
Reputation: 1247
(RGB: 233,132,125)
you need to set top, trailing and leading constraints and make its height 0.3% of the Superview.[RGB :220,250,138 and RGB :152,250,253 ]
(You can take UIButtons or UIViews or UILabels, whatever you want).(RGB : 204,135,248)
you have to bound them with top, bottom, leading and trailing spaces.I know this theoretical description will confuse you so check out these stuff in the video Here : https://youtu.be/XUh1n7X8ZRY
You can adjust heights as you need for your views.
Upvotes: 2