Shaggy D Shaggy D - 11 months ago 50
iOS Question

iOS Autolayout : Place a button exactly in the middle of two other buttons horizontally

I'm trying to build a view which looks something like this : enter image description here

The challenge I'm facing is I'm not able to identify the constraints that will be needed to place Button2 exactly in the center of Button1 and Button3.

All other constraints are satisfied, just struggling with this one. Any help will be appreciated


Embed that buttons in uiview. and set horizontally center in container constraint to it and give top,fixed height and width or leading and trailing constraint to it. And set top,leading,trailing and fixed height to other two buttons.

Or you can give equal width to every buttons, and manage constraints accordingly.

Main concern is take that label in one separate uiview. And then manage constraints accordingly.