From 604dfd73a155e1e4b584725c654a0a5cc2708ccd Mon Sep 17 00:00:00 2001 From: Vasavi Kanamarlapudi Date: Wed, 14 Aug 2024 15:30:18 +0530 Subject: [PATCH] Digital ACT-191 ONEAPP-9314 story: price to float value, load test data --- VDSSample/ViewControllers/PriceLockupViewController.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/VDSSample/ViewControllers/PriceLockupViewController.swift b/VDSSample/ViewControllers/PriceLockupViewController.swift index d5a7977..078e5a1 100644 --- a/VDSSample/ViewControllers/PriceLockupViewController.swift +++ b/VDSSample/ViewControllers/PriceLockupViewController.swift @@ -50,6 +50,7 @@ class PriceLockupViewController: BaseViewController { override func setupForm() { super.setupForm() + addFormRow(label: "Surface", view: surfacePickerSelectorView) addFormRow(label: "Bold", view: boldSwitch) addFormRow(label: "Kind", view: kindPickerSelectorView) addFormRow(label: "Size", view: sizePickerSelectorView) @@ -82,7 +83,7 @@ class PriceLockupViewController: BaseViewController { .numberPublisher .sink { [weak self] number in guard let number else { return } - self?.component.price = number.cgFloatValue + self?.component.price = number.floatValue }.store(in: &subscribers) leadingTextField @@ -105,7 +106,7 @@ class PriceLockupViewController: BaseViewController { } func setupModel() { - component.price = 24.99 + component.price = 24.22 component.superscript = "*" component.leadingText = "Save" component.trailingText = "with Auto Pay" @@ -113,6 +114,9 @@ class PriceLockupViewController: BaseViewController { sizePickerSelectorView.text = component.size.rawValue kindPickerSelectorView.text = component.kind.rawValue termPickerSelectorView.text = component.term.rawValue + leadingTextField.text = component.leadingText + trailingTextField.text = component.trailingText + superscriptTextField.text = component.superscript } func setupPicker() {