最佳答案
您可以通过在 UI 本身中调整乘数来添加屏幕高度来实现比例顶部空间。
它会自动调整顶部空间而不做任何导出限制。
-> UIView
-> UILabel (make hidden,for adjusting proportional top space)
Constraints : top space - 8(default), width - 50(constant any value) , center horizantaly of parent UIView, equal height to parent UIView.
Now modify your multipliers of proportional height to 0.2 (20% from your main view height) or 0.3(30 %).It will adjust based on screen size automatically.
- > UILabel (Verification Code) Constraints : top space min 8 (default) & others...
关于ios - 如何使 NSConstraint 的长度根据设备大小按比例变化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44774143/