Reputation: 2916
Look at the image. (Run on iPhone6 Plus)
These make me can't do what I want to.
I don't want the final answer is calculating the spacing and size rather than auto-layout -_-||
Does anyone can solve it by auto-layout?
Upvotes: 1
Views: 45
Reputation: 90551
It's a bit primitive, but the standard solution is to use spacing views. That is, put views between your buttons. Add constraints to keep each button adjacent to the spacing views on either side of it. Add constraints to keep all of the spacing views the same width. Add constraints to keep all of the spacing views the same height and a constraint to keep one of them (and thus all of them) to some specific height, possibly 0.
Upvotes: 1