ios - How do I constrain a UIStackView to the center of its parent view? -


the goal 2 stack views side side horizontally, left 1 contained left , center, right 1 constrained right , center, automatically resize on each size device still maintain center border b/w each other (using interface builder).

it sounds want 1 subview fill left half of superview, , other subview fill right half of superview.

constrain left subview's top, leading, , bottom superview. constrain right subview's top, trailing, , bottom superview. constrain left subview's trailing right subview's leading. constrain widths of subviews equal.

left subview's constraints

left subview constraints

right subview's constraints

right subview constraints


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -