diff --git a/VDSSample/ViewControllers/ModalViewController.swift b/VDSSample/ViewControllers/ModalViewController.swift index 377dd64..351e97d 100644 --- a/VDSSample/ViewControllers/ModalViewController.swift +++ b/VDSSample/ViewControllers/ModalViewController.swift @@ -51,10 +51,10 @@ class ModalViewController: BaseViewController { addFormRow(label: "Max Height", view: heightTextField) addFormRow(label: "Max Width", view: widthTextField) - fullScreenDialogSwitch.onChange = { [weak self] sender in - self?.component.fullScreenDialog = !sender.isOn - } - + fullScreenDialogSwitch.publisher(for: .valueChanged).sink { [weak self] control in + self?.component.fullScreenDialog = control.isOn + }.store(in: &subscribers) + titleTextField .textPublisher .sink { [weak self] text in