Skip to content

Commit caf0a63

Browse files
update UKAlertController to properly display buttons with minimal style
1 parent b68f23b commit caf0a63

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/ComponentsKit/Components/Alert/UKAlertController.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,14 @@ public class UKAlertController: UKCenterModalController {
143143
self.buttonsStackView.removeArrangedSubview(self.secondaryButton)
144144
self.buttonsStackView.insertArrangedSubview(self.secondaryButton, at: 0)
145145
self.buttonsStackView.axis = .horizontal
146+
self.buttonsStackView.distribution = .fillEqually
146147
case .vertical:
147148
self.buttonsStackView.axis = .vertical
149+
self.buttonsStackView.distribution = .fillProportionally
148150
}
149151
} else {
150152
self.buttonsStackView.axis = .vertical
153+
self.buttonsStackView.distribution = .fillProportionally
151154
}
152155
}
153156
}
@@ -173,7 +176,6 @@ extension UKAlertController {
173176
}
174177

175178
static func buttonsStackView(_ stackView: UIStackView) {
176-
stackView.distribution = .fillEqually
177179
stackView.spacing = AlertVM.buttonsSpacing
178180
}
179181
}

0 commit comments

Comments
 (0)