使用视觉格式语言的“宽度等于高度"约束 [英] “Width equals height” constraint using visual format language
本文介绍了使用视觉格式语言的“宽度等于高度"约束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为了添加等于其超级视图高度的宽度,我们可以按照
In order to add width equals to its superview height we can do following
NSLayoutConstraint(item: view, attribute: .width, relatedBy: .equal, toItem: view.superview, attribute: .height, multiplier: 1, constant: 0)
或者我们可以通过界面生成器完成
or we can do it from interface builder
但是如何使用VFL进行同样的操作?
But how can I do the same using VFL?
推荐答案
查看全文