[英]How should we fix UIFields in all iphone inches using Auto-layouts?
I am developing one project using Auto-layouts. 我正在使用自动版式开发一个项目。
But I am facing here one problem in Register page ie 但是我在这里面临注册页面中的一个问题,即
In 4 inch screen all UIFields fit perfectly, but in 6 inch screen there is some "space" coming at "bottom" side as like below 6 inch screen. 在4英寸的屏幕上,所有UIField都非常合适,但是在6英寸的屏幕上,“底部”侧有一些“空间”,例如6英寸的屏幕下方。
How should I resolve this problem? 我应该如何解决这个问题?
And I am posting screen which Auto-layouts I have applied. 我正在发布应用了自动版式的屏幕。
Main problem is coming here 6 inch screen some space is coming at bottom side it's not seems like Good how should I resolve this problem? 主要问题是在这里6英寸屏幕的底部有一些空间,看来不太好,该如何解决此问题?
If you want that all those button should always remain with same distance from bottom line then you can add constraint from main view's bottom (bottom space to bottom layout guide) for Register button instead of related to password field for Login button. 如果希望所有这些按钮始终与底线保持相同的距离,则可以为注册按钮添加从主视图底部的约束(底部空间到底部布局指南),而不必为“登录”按钮添加与密码字段相关的约束。 Then add vertical spacing to the Forgot Password button related to Register button, and vertical spacing for Login button related to Forgot Password button.
然后,将垂直间距添加到与“注册”按钮相关的“忘记密码”按钮,并将垂直间距添加到与“忘记密码”按钮相关的“登录”按钮。 Like Below :
像下面这样:
For Register Button , Add constraints : 对于Register Button,添加约束:
For Forget Password Button, Add constraints : 对于“忘记密码”按钮,添加约束:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.