Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 9c70a8c

Browse files
Make sure we don't keep the empty stackview shown in the buttons controller
Having the empty stackview causes issues with content hugging that results in a bigger buttons section than needed
1 parent 592fa49 commit 9c70a8c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

WordPressAuthenticator/NUX/Button/NUXStackedButtonsViewController.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,18 @@ private extension NUXStackedButtonsViewController {
150150
buttons = []
151151
topStackView?.arrangedSubviews.forEach({ $0.removeFromSuperview() })
152152
bottomStackView?.arrangedSubviews.forEach({ $0.removeFromSuperview() })
153+
topStackView?.isHidden = true
154+
bottomStackView?.isHidden = true
155+
153156
for config in buttonConfigs {
154157
let button = NUXButton()
155158
switch config.stackView {
156159
case .top:
157160
topStackView?.addArrangedSubview(button)
161+
topStackView?.isHidden = false
158162
case .bottom:
159163
bottomStackView?.addArrangedSubview(button)
164+
bottomStackView?.isHidden = false
160165
}
161166
button.configure(withConfig: config.config, and: config.style)
162167
buttons.append(button)

0 commit comments

Comments
 (0)