什么是“使用标准值"和“限制利润率"?在自动版式中是什么意思? [英] What do "Use standard value” and “Constrain to Margins" mean in Auto Layout?

查看:170
本文介绍了什么是“使用标准值"和“限制利润率"?在自动版式中是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看过一些自动布局教程,例如

I have gone through a couple of Auto Layout tutorials such as this. However I am still not clear on what the following options do in the pin dialog

  1. 标准值,手动值和画布值之间有什么区别?

  1. What are the differences between standard value, manual values, and canvas values?

约束到边距复选框有什么作用?

align 会做什么?

推荐答案

标准值,手动值和画布值之间有什么区别?

What are the differences between standard value, manual values, and canvas values?

标准值使用建议用于指定项之间距离的约束的建议间距" ,通常约为10点.

Standard value uses "the recommended spacing for constraints that specify distance between items", which is usually around 10 points.

当前画布值从您当前在画布上显示对象的方式复制该值.

Current canvas value copies the value from how you have the objects currently displayed on the canvas.

手动值随心所欲.

限制利润率复选框有什么作用?

What does the constrain to margin checkbox do?

这限制了容器视图的边距,而不是边缘.来自文档:

This constrains to a container view's margins instead of its edges. From the docs:

容器视图的水平和垂直约束可以在边缘或边缘.边距与UIView的layoutMargins属性中的值相对应,并建议在容器视图的边缘与子级的对应边缘之间建议的最小距离."

"Horizontal and vertical constraints to a container view can be to the margin or to the edge. Margins correspond to the values in the layoutMargins atttribute of UIView and specify recommended minimal distances between an edge of a container view and the corresponding edge of a child."

您可以使用

You can set a view's margins using the layoutMargins property.

align做什么?

What does align do?

这将创建一个约束,即一个视图的边缘或中心应与另一视图的边缘或中心对齐.例如,在一列文本视图中,您可能希望每个文本字段的前缘和后缘对齐.

This creates a constraint that edges or center of one view should be aligned with edges or center of another view. For example, in a column of text views, you might want every text field to have their leading and trailing edges aligned.

这篇关于什么是“使用标准值"和“限制利润率"?在自动版式中是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆