iOS自动布局在父视图外添加约束

时间:2016-03-12 08:37:53

标签: ios ios8 autolayout ios9 xcode7

任何人都可以帮助我理解如何在父视图之外添加约束


- 内容查看

---- UIImageView1

----查看

-------的 UIImageView2

我希望 UIImageView1 UIImageView2

具有相同的高度

1 个答案:

答案 0 :(得分:1)

您需要将相等高度和宽高比约束添加到Imageview 2,与Imageview 1相对应。

enter image description here

注意: - 如果您的两个高度图像视图修复,则只需将修复高度提供给两个Imageview。

enter image description here