fixed bug in radiobutton group

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-08-31 16:39:16 -05:00
parent 18ff68e76e
commit 5ff8d2f06e
3 changed files with 10 additions and 14 deletions

View File

@ -106,7 +106,11 @@ open class SelectorGroupBase<SelectorItemType: Control>: Control, SelectorGroup,
super.setup()
addSubview(mainStackView)
mainStackView.pinToSuperView()
mainStackView
.pinTop()
.pinLeading()
.pinTrailing()
.pinBottom(0, .defaultHigh)
}
/// Handler for the Group to override on a select event.

View File

@ -178,7 +178,11 @@ open class SelectorItemBase<Selector: SelectorControlable>: Control, Errorable,
selectorStackView.addArrangedSubview(selectorLabelStackView)
selectorLabelStackView.addArrangedSubview(label)
selectorLabelStackView.addArrangedSubview(childLabel)
mainStackView.pinToSuperView()
mainStackView
.pinTop()
.pinLeading()
.pinTrailing()
.pinBottom(0, .defaultHigh)
}
/// Used to make changes to the View based off a change events or from local properties.

View File

@ -73,18 +73,6 @@ open class RadioButtonGroup: SelectorGroupBase<RadioButtonItem>, SelectorGroupSi
}
}
//--------------------------------------------------
// MARK: - Overrides
//--------------------------------------------------
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
open override func setup() {
super.setup()
addSubview(mainStackView)
mainStackView.pinToSuperView()
}
public override func didSelect(_ selectedControl: RadioButtonItem) {
if let selectedItem {
updateToggle(selectedItem)