在 stroybord 检查器中使用等式编辑自动布局 "constant" 属性

editing autolayout "constant" attribute with equation in the stroybord inspector

是否可以在情节提要检查器中的 "Constant" 属性中填充方程,而不是直接常数
如果是这样,你能给我写一个这样做的例子吗?

发送 ;)

对于基本约束 "equations" 你可以经常使用乘数。

对于您的具体示例,"SuperView.Width/3" 对于 "Equal Width" 约束,将视图的宽度设置为与超级视图的宽度相等,然后输入 0.333331:3 作为乘数:

现在您的子视图将始终是其 superView 宽度的 1/3。