Need assistance setting two buttons of equal width, side by side Autolayout

后端 未结 4 1989
臣服心动
臣服心动 2020-11-27 22:46

Using auto layout I am trying to create two buttons on the bottom like this

\"enter

相关标签:
4条回答
  • 2020-11-27 22:52

    you can done it using equal width to 2nd button like this

    enter image description here

    and the output is

    enter image description here

    Here is apple guide

    0 讨论(0)
  • 2020-11-27 22:55

    You need to add one more constraint - set horizontal space between buttons to 0

    enter image description here

    0 讨论(0)
  • 2020-11-27 23:01

    You can followed the layout changes. you will get what you want.

    Layout for Back button. enter image description here Layout for Go to Setting button.

    enter image description here

    0 讨论(0)
  • 2020-11-27 23:11

    You can have the equal widths constraint between the buttons, but you also have to tell them which is that width you need.

    So drag from a button to the superview, add an equal widths constraint. Then in the properties of the constraint you've added, set the multiplier to 0.5, this way your buttons should be on half the screen.

    0 讨论(0)
提交回复
热议问题