Ensure that isEnabled only triggers when false. Preventing isEnabled from changing isON.
This commit is contained in:
parent
14f49882b1
commit
dfa2fa3343
@ -61,7 +61,7 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
||||
open override var isEnabled: Bool {
|
||||
didSet {
|
||||
isUserInteractionEnabled = isEnabled
|
||||
changeStateNoAnimation(isEnabled)
|
||||
changeStateNoAnimation(isEnabled ? isOn : false)
|
||||
backgroundColor = isEnabled ? containerTintColor?.off : disabledTintColor?.container
|
||||
knobView.backgroundColor = isEnabled ? knobTintColor?.off : disabledTintColor?.knob
|
||||
}
|
||||
@ -398,6 +398,10 @@ extension Toggle {
|
||||
if let isAnimated = dictionary["isAnimated"] as? Bool {
|
||||
self.isAnimated = isAnimated
|
||||
}
|
||||
|
||||
if let isEnabled = dictionary["isEnabled"] as? Bool{//}, !isEnabled {
|
||||
self.isEnabled = isEnabled
|
||||
}
|
||||
}
|
||||
|
||||
public class func estimatedHeight(forRow json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user