【问题标题】:Equal heights constraint will only use the larger value (Interface Builder)等高约束将仅使用较大的值(界面生成器)
【发布时间】:2020-09-10 14:21:24
【问题描述】:

我试图在 StackView 的不同列中的 ScrollView 之间强制执行相等的高度约束。当我强制执行约束时,较小的 ScrollView 增长为等于较大的。这会导致某些内容在屏幕外丢失。我已经尝试从两个方向创建约束。

为什么会这样?

Unequal heights, left column has more elements.

Add equal height constraint. Change the multiplier from 1.25 to 1.0.

The left scroll view grows and causes some content to be placed off screen.

【问题讨论】:

    标签: ios swift xcode constraints interface-builder


    【解决方案1】:

    我想我找到了问题所在。具有填充类型分布的 UIStackView 不能有“空白”空间,因为内容会自动增长或缩小以适应定义的边界。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-21
      • 2018-01-27
      • 1970-01-01
      • 2018-02-18
      • 2015-08-01
      相关资源
      最近更新 更多