我的项目中有一个stackView。 stackView中有6个元素,它们的高度值不同。并且stackView的固定间距值和其中一些具有最高约束。是否可以计算整个stackView的高度?
stack view
line 1 H = 20 spacing from top = 0
line 2 H = 15 spacing from top = 10
line 3 H = 30 spacing from top = 0
line 4 H = 10 spacing from top = 0
line 5 H = 10 spacing from top = 15
line 6 H = 15 spacing from top = 0
stack view spacing = 10
我想以编程方式计算整个stackView的高度。