removed accessibility settings to use VDS and rearranged
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
c7d5cac1af
commit
62a74e8c34
@ -109,22 +109,6 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Lifecycle
|
// MARK: - Lifecycle
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
public func updateView(_ size: CGFloat) { }
|
|
||||||
|
|
||||||
public override func setup() {
|
|
||||||
super.setup()
|
|
||||||
|
|
||||||
bridge_accessibilityHintBlock = { [weak self] in
|
|
||||||
guard let self else { return nil }
|
|
||||||
return MVMCoreUIUtility.hardcodedString(withKey: isEnabled ? "AccToggleHint" : "AccDisabled")
|
|
||||||
}
|
|
||||||
|
|
||||||
bridge_accessibilityValueBlock = { [weak self] in
|
|
||||||
guard let self else { return nil }
|
|
||||||
return isOn ? MVMCoreUIUtility.hardcodedString(withKey: "AccOn") : MVMCoreUIUtility.hardcodedString(withKey: "AccOff")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override func reset() {
|
public override func reset() {
|
||||||
super.reset()
|
super.reset()
|
||||||
accessibilityLabel = MVMCoreUIUtility.hardcodedString(withKey: "Toggle_buttonlabel")
|
accessibilityLabel = MVMCoreUIUtility.hardcodedString(withKey: "Toggle_buttonlabel")
|
||||||
@ -132,21 +116,6 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
|||||||
shouldToggleAction = { return true }
|
shouldToggleAction = { return true }
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
|
||||||
// MARK: - Actions
|
|
||||||
//--------------------------------------------------
|
|
||||||
/// This will toggle the state of the Toggle and execute the actionBlock if provided.
|
|
||||||
public func toggleAndAction() {
|
|
||||||
toggle()
|
|
||||||
}
|
|
||||||
|
|
||||||
open override func toggle() {
|
|
||||||
if let result = shouldToggleAction?(), result {
|
|
||||||
super.toggle()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK:- MoleculeViewProtocol
|
|
||||||
public func viewModelDidUpdate() {
|
public func viewModelDidUpdate() {
|
||||||
FormValidator.setupValidation(for: viewModel, delegate: delegateObject?.formHolderDelegate)
|
FormValidator.setupValidation(for: viewModel, delegate: delegateObject?.formHolderDelegate)
|
||||||
|
|
||||||
@ -185,7 +154,27 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Actions
|
||||||
|
//--------------------------------------------------
|
||||||
|
/// This will toggle the state of the Toggle and execute the actionBlock if provided.
|
||||||
|
public func toggleAndAction() {
|
||||||
|
toggle()
|
||||||
|
}
|
||||||
|
|
||||||
|
open override func toggle() {
|
||||||
|
if let result = shouldToggleAction?(), result {
|
||||||
|
super.toggle()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK:- MoleculeViewProtocol
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public func updateView(_ size: CGFloat) {}
|
||||||
|
|
||||||
public class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
public class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||||
return Self().intrinsicContentSize.height
|
return Self().intrinsicContentSize.height
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user