diff --git a/VDSSample/ViewControllers/TileletViewController.swift b/VDSSample/ViewControllers/TileletViewController.swift index e8453a5..f2d7ae9 100644 --- a/VDSSample/ViewControllers/TileletViewController.swift +++ b/VDSSample/ViewControllers/TileletViewController.swift @@ -37,6 +37,12 @@ class TileletViewController: BaseViewController { items: Tilelet.TextPosition.allCases.sorted{ $0.rawValue < $1.rawValue }) }() + lazy var paddingPickerSelectorView = { + PickerSelectorView(title: "16", + picker: self.picker, + items: Tilelet.Padding.allCases) + }() + var clickableSwitch = Toggle() var titleTextField = TextField() @@ -67,7 +73,8 @@ class TileletViewController: BaseViewController { addFormRow(label: "Title Style", view: titleStandardStylePickerSelectorView) addFormRow(label: "Other Style", view: otherStandardStylePickerSelectorView) - + addFormRow(label: "Padding", view: paddingPickerSelectorView) + addFormRow(label: "Title Text", view: titleTextField) addFormRow(label: "Title is Bold", view: titleIsBold) addFormRow(label: "Subtitle Color", view: subtitleColorPickerSelectorView) @@ -167,10 +174,15 @@ class TileletViewController: BaseViewController { self?.component.directionalIconModel = nil } } + titleIsBold.publisher(for: .valueChanged).sink { [weak self] toggle in - self?.component.padding = .padding6X self?.setTitleModel() }.store(in: &subscribers) + + paddingPickerSelectorView.onPickerDidSelect = { [weak self] item in + self?.component.padding = item + } + } func setupModel() { @@ -183,6 +195,7 @@ class TileletViewController: BaseViewController { //setup UI surfacePickerSelectorView.text = component.surface.rawValue + paddingPickerSelectorView.text = component.padding.rawValue otherStandardStylePickerSelectorView.text = subTitleModel.standardStyle.rawValue titleStandardStylePickerSelectorView.text = titleModel.standardStyle.rawValue subtitleColorPickerSelectorView.text = subTitleModel.textColor.rawValue