From 71a299a3d0ec4d92735f74b08924671ae245c9f0 Mon Sep 17 00:00:00 2001 From: Vasavi Kanamarlapudi Date: Fri, 27 Sep 2024 18:13:49 +0530 Subject: [PATCH] Digital ACT-191 ONEAPP-10928 story: updating fullScreenDialog flag on control changes --- VDSSample/ViewControllers/ModalViewController.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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