mirror of https://github.com/xaoxuu/ProHUD
fillEqually
This commit is contained in:
parent
d06fb00c6f
commit
abe4738c0f
|
@ -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
|
||||
}()
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue