Merge branch 'feature/access_toggle' into 'release/7_6_0'
accessibility for toggle See merge request BPHV_MIPS/mvm_core_ui!400
This commit is contained in:
commit
b351a9dddc
@ -246,6 +246,7 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
||||
|
||||
backgroundColor = containerTintColor.off
|
||||
knobView.backgroundColor = knobTintColor.off
|
||||
accessibilityLabel = MVMCoreUIUtility.hardcodedString(withKey: "Toggle_buttonlabel")
|
||||
isAnimated = true
|
||||
didToggleAction = nil
|
||||
shouldToggleAction = { return true }
|
||||
@ -373,6 +374,10 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
||||
isAnimated = model.animated
|
||||
isEnabled = model.enabled
|
||||
|
||||
if let accessibileString = model.accessibilityText {
|
||||
accessibilityLabel = accessibileString
|
||||
}
|
||||
|
||||
if let actionMap = model.action?.toJSON() {
|
||||
didToggleAction = { MVMCoreActionHandler.shared()?.handleAction(with: actionMap, additionalData: additionalData, delegateObject: delegateObject) }
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user