I want two buttons to have equal width and position themselves proportionally in all screens sizes from the top of the scree using autolayout?

后端 未结 6 1762
余生分开走
余生分开走 2021-01-27 01:43

Attaching the view i am planning to design. I would like to position the Buttons with respect to Superview and their Width and Height must increase proportionally to the Screen

6条回答
  •  孤街浪徒
    2021-01-27 02:31

    For the Left Button:

    1. Top constraint from the top of the view
    2. Left constraint from the left edge of the view
    3. Height constraint
    4. Right constraint to the right button -> That will be 0

    For the Right Button:

    1. Top constraint from the top of the view
    2. Right constraint from the right edge of the view
    3. Height constraint
    4. Left constraint to the right button -> That will be 0

提交回复
热议问题