Reputation: 8158
I've laid out this view hierarchy in IB (Xcode 6.3.1):
I would like to use Auto Layout (FYI: I am new to Auto Layout) to distribute the subviews horizontally (their widths should always be equal to each other).
I'd really appreciate any pointers... the constraints I've added thus far have not kept the widths of the subviews equal.
Upvotes: 0
Views: 70
Reputation: 25144
You should add these constraints:
And you'll be good to go.
No need to specify that width of green == width of gray, they are already related to width of white, that'd be redundant, and autolayout hates redundancy.
Upvotes: 2