【问题标题】:How to set constraints to set height of UIView same as flexible height of adjacent view?如何设置约束以将 UIView 的高度设置为与相邻视图的灵活高度相同?
【发布时间】:2015-05-28 21:11:20
【问题描述】:

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

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

但是,在另一种情况下,没有图像的情节提要:

我得到结果:

我的 UITableView 正在使用 UITableViewAutomaticDimension

问题是:

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

【问题讨论】:

    标签: ios uitableview uiview constraints uitableviewautomaticdimension


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-04
      • 2015-06-27
      • 1970-01-01
      • 2015-08-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-25
      相关资源
      最近更新 更多