如何设置约束来设置UIView的高度与相邻视图的灵活高度相同?

时间:2015-05-28 21:11:20

标签: ios uitableview uiview constraints uitableviewautomaticdimension

我在 storyboard 中有一个包含图片的UIView的视图:

enter image description here

当我编译表格时,我得到:

enter image description here

但是,在没有图像的故事板中的另一个案例中:

enter image description here

我得到结果:

enter image description here

我的 UITableView 正在使用 UITableViewAutomaticDimension

问题是:

如何设置UIImageView的约束以确定其高度与相邻视图的最大高度相同?

1 个答案:

答案 0 :(得分:-1)

向UIImageView添加两个约束以将其约束到UIView的顶部和底部

相关问题