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 1848
余生分开走
余生分开走 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:27

    Steps 1. Take two button side by side. 2. Give constraint for left button leading, top to superview. 3. Select height for left button. 3. Press control drag cursor from left button to right button and select horizontal spacing(select space between two button) 4. Give constraint to right side button top, trailing to superview. 5. Select height for right button. 6. Now press command ,select both buttons and see pin option below right side there select equal widths. 7.If some warning is showing means , no problem just click remove that warnings.

提交回复
热议问题