简体   繁体   English

我们应该如何使用自动布局在所有iphone英寸中修复UIField?

[英]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. 我正在发布应用了自动版式的屏幕。

Applied Constraints: 应用限制:

在此处输入图片说明

4 inch: 4英寸:

在此处输入图片说明

6 inch: 6英寸:

在此处输入图片说明

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 : 对于“忘记密码”按钮,添加约束: 在此处输入图片说明

And for Login Button, add constraints : 对于登录按钮,添加约束: 在此处输入图片说明

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在iOS中使用自动布局制作垂直间距的黑白UIField - How to make Vertical spacing B/W UIFields using Auto-layouts in Ios 如何使用自动布局使等距黑白UIFields? - How to make equal space b/w UIFields using auto-layouts? 当我们点击按钮时,如何在Ios中设置自动布局? - How to set Auto-layouts in Ios when we tapped on button? 我们如何使用自动布局提供按钮之间的水平间距(受视觉效果的限制) - How can we provide horizontal spacing between buttons using auto-layouts(constraint with visual formate) 我们如何使用自动布局以编程方式基于数据来增加UITextview的大小 - How can we Growing UITextview size based on data programmatically using Auto-layouts 我们如何以编程方式使用自动布局在文本文件之间提供垂直空间(constraintsWithVisualFormat) - How can we give vertical space between text-fileds using auto-layouts programatically(constraintsWithVisualFormat) 如何在iOS中使用自动布局更改scrollView内容大小 - How to change scrollView content sizes using auto-layouts in ios 如何使用自动布局以编程方式在UIscrollview上添加字段 - How add fields programatically on UIscrollview using auto-layouts 如何以文字方式使用自动布局以编程方式添加UIviews? - How to add UIviews programmatically using auto-layouts parogramatically? 使用自动布局的屏幕外UIView(以编程方式) - Offscreen UIView using Auto-layouts (programmatically)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM