From b91e931f4782936f809768aa579e468f9679e932 Mon Sep 17 00:00:00 2001 From: vasavk Date: Thu, 21 Mar 2024 09:32:57 +0530 Subject: [PATCH] Digital ACT-191 ONEAPP-6830 story: scroll thumb on given position value --- .../ViewControllers/CarouselScrollbarViewConttroller.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/VDSSample/ViewControllers/CarouselScrollbarViewConttroller.swift b/VDSSample/ViewControllers/CarouselScrollbarViewConttroller.swift index 2ad8bb8..537e2de 100644 --- a/VDSSample/ViewControllers/CarouselScrollbarViewConttroller.swift +++ b/VDSSample/ViewControllers/CarouselScrollbarViewConttroller.swift @@ -51,6 +51,7 @@ class CarouselScrollbarViewConttroller: BaseViewController { return } self?.component.numberOfSlides = number.intValue + self?.component.position = Int(self?.positionTextField.text ?? "1") }.store(in: &subscribers) positionTextField @@ -67,7 +68,7 @@ class CarouselScrollbarViewConttroller: BaseViewController { func setupModel() { //setup UI - component.numberOfSlides = 8 + component.numberOfSlides = 3 surfacePickerSelectorView.text = component.surface.rawValue disabledSwitch.isOn = !component.isEnabled slidesTextField.text = String(component.numberOfSlides ?? 1) @@ -82,6 +83,7 @@ class CarouselScrollbarViewConttroller: BaseViewController { layoutPickerSelectorView.onPickerDidSelect = { [weak self] item in self?.component.selectedLayout = item + self?.component.position = Int(self?.positionTextField.text ?? "1") } } }