added notes for backgroundColor
added in ToggleBase property setters for ToggleModel properties Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
e27fa862d5
commit
20fcbb57c2
@ -78,12 +78,23 @@ open class Toggle: ToggleBase, VDSMoleculeViewProtocol {
|
|||||||
|
|
||||||
open override func updateView() {
|
open override func updateView() {
|
||||||
super.updateView()
|
super.updateView()
|
||||||
|
//we want to overwrite the VDS color that is set in the ToggleBase
|
||||||
|
//for surface since the Atomic controls doesn't look at
|
||||||
|
//surface today for its views. We just want to show whatever
|
||||||
|
//the current parent's background color.
|
||||||
backgroundColor = .clear
|
backgroundColor = .clear
|
||||||
}
|
}
|
||||||
|
|
||||||
open func viewModelDidUpdate() {
|
open func viewModelDidUpdate() {
|
||||||
guard let viewModel else { return }
|
guard let viewModel else { return }
|
||||||
|
|
||||||
|
//set properties from the viewModel change that came in
|
||||||
|
if let accessibileString = viewModel.accessibilityText {
|
||||||
|
accessibilityLabelEnabled = accessibileString
|
||||||
|
accessibilityLabelDisabled = accessibileString
|
||||||
|
}
|
||||||
|
isAnimated = viewModel.animated
|
||||||
|
|
||||||
//send toggle.model to the Form
|
//send toggle.model to the Form
|
||||||
FormValidator.setupValidation(for: viewModel, delegate: delegateObject?.formHolderDelegate)
|
FormValidator.setupValidation(for: viewModel, delegate: delegateObject?.formHolderDelegate)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user