I have a quick question according auto layout. Maybe I am missing something, but since two hours I am trying to align 3 views next to each other with same width. My goal is that each view is using 1/3 of the screens with. After autorotation all views should have each the same width, but all views next to each other should have a total width of the superview.
My idea looks like this:
Doing this programmatically is kind of easy. Is it possible to solve this task by only using interface builder?
Yes just set it as the same size as parent view (then change it to 1:3 ratio) and set leading constraints to 0. You do this by ctrl dragging the view you want to it's super view. There you select the Equal Widths
property.
Like this, but 1:3 ratio
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With