您好,我是 UIStackViews 的新手。
所以我有一个包含 8 个标签的垂直 Stackview。
但是,我的 Stackview 的问题是,每当我将标签隐藏在其中时,我的 Stackview 都不会调整大小。
The labels within the Red Rectangle are in my Stackview
When I hide those labels of the Stackview, I want my screen to look like this
However for some reason when I hide those labels, it looks like this instead with all the space visible and the stuff at the bottom doesn't go up
我该如何解决这个问题?
这是我隐藏标签的方法:
override func viewDidLoad() {
super.viewDidLoad()
showingResultLabel.isHidden = true
addressLabel.isHidden = true
costOfKitLabel.isHidden = true
costOfModularLabel.isHidden = true
dispatchedFromLabel.isHidden = true
kitHomecostLabel.isHidden = true
modularHomecostLabel.isHidden = true
dispatchFromLabel.isHidden = true
谢谢
最佳答案
关于ios - UIStackview 在隐藏其中的标签时不调整大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51461838/