Making a UIButton a % of the screen size

前端 未结 4 1460
再見小時候
再見小時候 2021-01-13 00:57

I noticed certain button sizes look great on one the iPhone 5 simulator but do not look as good on the iPhone 6 simulator and this is because the heights or constraints that

4条回答
  •  北荒
    北荒 (楼主)
    2021-01-13 01:34

    1. Ctrl drag from button to superview and select Equal Widths
    2. Open Size Inspector edit Equal Widths constraint and set multiplier to 0.4. And you will see something like this: enter image description here

    3. Add missing constraints and update frames.

    enter image description here

提交回复
热议问题