i found stackoverflow post asking exact same thing trying solve (ios autolayout how stretch 2 button horizontally), still having issues figuring out how go aligning edge of object center of superview. need 2 buttons aligned side-by-side in example in post linked, cannot figure out how reference center of superview set alignment it, shown in screenshots. provide little more insight how achieve result mentioned in linked post? thank much.
one way set pin left button left edge. right button right edge, pin left side of right button right side of left button. set widths equal. easiest way me if i'm using storyboard.
make sure constraint between 2 buttons has constant of 0 or space want between them.
if take @ screenshot click button when red or yellow tell constraints missing on button. if view misplaced hit view , press cmd+option+"=" , give preview based on constraints you've placed on it.
Comments
Post a Comment