added heightConstraint for the twobutton
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
f53847372a
commit
bfe209305d
@ -17,11 +17,11 @@ import VDS
|
||||
open var viewModel: TwoButtonViewModel!
|
||||
open var delegateObject: MVMCoreUIDelegateObject?
|
||||
open var additionalData: [AnyHashable : Any]?
|
||||
|
||||
|
||||
open var primaryButton = PillButton()
|
||||
open var secondaryButton = PillButton()
|
||||
private var buttonGroup = VDS.ButtonGroup()
|
||||
|
||||
private var heightConstraint: NSLayoutConstraint?
|
||||
//--------------------------------------------------
|
||||
// MARK: - Lifecycle
|
||||
//--------------------------------------------------
|
||||
@ -34,6 +34,7 @@ import VDS
|
||||
buttonGroup.alignment = .center
|
||||
buttonGroup.rowQuantityPhone = 2
|
||||
buttonGroup.rowQuantityTablet = 2
|
||||
heightConstraint = height(constant: VDS.Button.Size.large.height, priority: .defaultHigh)
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
@ -70,6 +71,8 @@ import VDS
|
||||
if buttons.count != buttonGroup.buttons.count {
|
||||
buttonGroup.buttons = buttons
|
||||
}
|
||||
|
||||
heightConstraint?.constant = primaryButton.size == .small || secondaryButton.size == .small ? VDS.Button.Size.small.height : VDS.Button.Size.large.height
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user