diff --git a/VDSSample/ViewControllers/CalendarViewController.swift b/VDSSample/ViewControllers/CalendarViewController.swift index a2ae7a7..4506ffd 100644 --- a/VDSSample/ViewControllers/CalendarViewController.swift +++ b/VDSSample/ViewControllers/CalendarViewController.swift @@ -14,8 +14,8 @@ import VDSTokens class CalendarViewController: BaseViewController { var containerBorderSwitch = Toggle() - var dateIndicatorSwitch = Toggle() - var transparentSwitch = Toggle() + var hideCurrentDateIndicatorSwitch = Toggle() + var transparentBgSwitch = Toggle() var indicatorOneSwitch = Toggle() var indicatorTwoSwitch = Toggle() var indicatorThreeSwitch = Toggle() @@ -57,10 +57,10 @@ class CalendarViewController: BaseViewController { //add form rows addFormRow(label: "Surface", view: surfacePickerSelectorView) addFormRow(label: "Hide Container Border", view: containerBorderSwitch) - addFormRow(label: "Hide Current Date Indicator", view: dateIndicatorSwitch) + addFormRow(label: "Hide Current Date Indicator", view: hideCurrentDateIndicatorSwitch) addFormRow(label: "Min Date", view: minDateField) addFormRow(label: "Max Date", view: maxDateField) - addFormRow(label: "Transparent Background", view: transparentSwitch) + addFormRow(label: "Transparent Background", view: transparentBgSwitch) addFormRow(label: "Indicator One", view: indicatorOneSwitch) addFormRow(label: "Indicator Two", view: indicatorTwoSwitch) addFormRow(label: "Indicator Three", view: indicatorThreeSwitch) @@ -76,6 +76,16 @@ class CalendarViewController: BaseViewController { component.hideContainerBorder = sender.isOn } + hideCurrentDateIndicatorSwitch.onChange = { [weak self] sender in + guard let self else { return } + component.hideCurrentDateIndicator = sender.isOn + } + + transparentBgSwitch.onChange = { [weak self] sender in + guard let self else { return } + component.transparentBackground = sender.isOn + } + legendOneField .textPublisher .sink { @@ -148,6 +158,7 @@ class CalendarViewController: BaseViewController { indicatorOneSwitch.isOn = true indicatorTwoSwitch.isOn = true indicatorThreeSwitch.isOn = true + hideCurrentDateIndicatorSwitch.isOn = false } func updateIndicatorData(label: String = "", date: Date?, index:Int) {