merge
This commit is contained in:
commit
324f3850f6
@ -62,8 +62,7 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
||||
didSet {
|
||||
isUserInteractionEnabled = isEnabled
|
||||
changeStateNoAnimation(isEnabled ? isOn : false)
|
||||
backgroundColor = isEnabled ? (isOn ? containerTintColor.on : containerTintColor.off) : disabledTintColor.container
|
||||
knobView.backgroundColor = isEnabled ? (isOn ? knobTintColor.on : knobTintColor.off) : disabledTintColor.knob
|
||||
setToggleAppearanceFromState()
|
||||
accessibilityHint = MVMCoreUIUtility.hardcodedString(withKey: isEnabled ? "AccToggleHint" : "AccDisabled")
|
||||
}
|
||||
}
|
||||
@ -97,8 +96,7 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
||||
}, completion: nil)
|
||||
|
||||
} else {
|
||||
backgroundColor = isOn ? containerTintColor.on : containerTintColor.off
|
||||
knobView.backgroundColor = isOn ? knobTintColor.on : knobTintColor.off
|
||||
setToggleAppearanceFromState()
|
||||
self.constrainKnob()
|
||||
}
|
||||
|
||||
@ -352,6 +350,12 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
||||
// MARK: - Animations
|
||||
//--------------------------------------------------
|
||||
|
||||
public func setToggleAppearanceFromState() {
|
||||
|
||||
backgroundColor = isEnabled ? isOn ? containerTintColor.on : containerTintColor.off : disabledTintColor.container
|
||||
knobView.backgroundColor = isEnabled ? isOn ? knobTintColor.on : knobTintColor.off : disabledTintColor.knob
|
||||
}
|
||||
|
||||
public func knobReformAnimation() {
|
||||
|
||||
if isAnimated {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user