updated samples
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
97529455a3
commit
c99fbd0656
@ -95,6 +95,14 @@ class CheckboxGroupViewController: ModelScrollViewController<DefaultCheckboxGro
|
|||||||
self?.model = viewModel
|
self?.model = viewModel
|
||||||
}.store(in: &subscribers)
|
}.store(in: &subscribers)
|
||||||
|
|
||||||
|
checkboxGroup
|
||||||
|
.publisher(for: .valueChanged)
|
||||||
|
.sink { group in
|
||||||
|
group.model.selectors.forEach { checkbox in
|
||||||
|
print("\(checkbox.labelText!) selected: \(checkbox.selected)")
|
||||||
|
}
|
||||||
|
}.store(in: &subscribers)
|
||||||
|
|
||||||
//setup UI
|
//setup UI
|
||||||
surfacePickerSelectorView.text = model.surface.rawValue
|
surfacePickerSelectorView.text = model.surface.rawValue
|
||||||
disabledSwitch.isOn = model.disabled
|
disabledSwitch.isOn = model.disabled
|
||||||
|
|||||||
@ -100,6 +100,12 @@ class CheckboxViewController: ModelScrollViewController<DefaultCheckboxModel> {
|
|||||||
self?.model = viewModel
|
self?.model = viewModel
|
||||||
}.store(in: &subscribers)
|
}.store(in: &subscribers)
|
||||||
|
|
||||||
|
checkbox
|
||||||
|
.publisher(for: .valueChanged)
|
||||||
|
.sink { checkbox in
|
||||||
|
print("checkbox selected: \(checkbox.model.selected)")
|
||||||
|
}.store(in: &subscribers)
|
||||||
|
|
||||||
//setup UI
|
//setup UI
|
||||||
surfacePickerSelectorView.text = model.surface.rawValue
|
surfacePickerSelectorView.text = model.surface.rawValue
|
||||||
disabledSwitch.isOn = model.selected
|
disabledSwitch.isOn = model.selected
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user