From 1e90e33b1e5c91decdf9c27b48561bacebd75300 Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Thu, 25 Jun 2020 10:54:51 -0400 Subject: [PATCH] fix enabled state for toggle --- MVMCoreUI/Atomic/Atoms/Views/Toggle.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/Toggle.swift b/MVMCoreUI/Atomic/Atoms/Views/Toggle.swift index 17fabef7..98619c8f 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/Toggle.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/Toggle.swift @@ -96,8 +96,8 @@ public typealias ActionBlockConfirmation = () -> (Bool) }, completion: nil) } else { - backgroundColor = isOn ? containerTintColor.on : containerTintColor.off - knobView.backgroundColor = isOn ? knobTintColor.on : knobTintColor.off + backgroundColor = isEnabled ? isOn ? containerTintColor.on : containerTintColor.off : disabledTintColor.container + knobView.backgroundColor = isEnabled ? isOn ? knobTintColor.on : knobTintColor.off : disabledTintColor.knob self.constrainKnob() }