diff --git a/Sources/ProHUD/Alert/Alert.swift b/Sources/ProHUD/Alert/Alert.swift index 33eb439..3c155bf 100644 --- a/Sources/ProHUD/Alert/Alert.swift +++ b/Sources/ProHUD/Alert/Alert.swift @@ -65,7 +65,7 @@ public class Alert: ProHUD.Controller { public lazy var actionStack: StackView = { let stack = StackView() stack.alignment = .fill - stack.distribution = .fill + stack.distribution = .fillEqually stack.spacing = config.margin return stack }() diff --git a/Sources/ProHUD/Alert/AlertDefaultLayout.swift b/Sources/ProHUD/Alert/AlertDefaultLayout.swift index 69da7cc..983d23c 100644 --- a/Sources/ProHUD/Alert/AlertDefaultLayout.swift +++ b/Sources/ProHUD/Alert/AlertDefaultLayout.swift @@ -108,9 +108,8 @@ extension Alert: DefaultLayout { guard isViewDisplayed == false && config.actionAxis == nil else { return } let count = actionStack.arrangedSubviews.filter({ $0.isKind(of: UIControl.self )}).count guard count < 4 else { return } - if isPortrait && count < 3 || !isPortrait { + if (isPortrait && count < 3) || !isPortrait { actionStack.axis = .horizontal - actionStack.distribution = .fillEqually } }