等高约束将仅使用较大的值(界面生成器)

问题描述 投票:-1回答:1

我正在尝试在StackView的单独列中的ScrollView之间实施相等的高度限制。当我强制约束时,较小的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个回答
0
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.