From 9922ef467422d6b007f9b6b6213eeb9a1855ed6c Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Tue, 8 Oct 2019 16:45:34 -0400 Subject: [PATCH] added enabled molecule logic. --- MVMCoreUI/Atoms/Views/Checkbox.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MVMCoreUI/Atoms/Views/Checkbox.swift b/MVMCoreUI/Atoms/Views/Checkbox.swift index 0d2c3e75..2ece7d4a 100644 --- a/MVMCoreUI/Atoms/Views/Checkbox.swift +++ b/MVMCoreUI/Atoms/Views/Checkbox.swift @@ -354,6 +354,7 @@ import MVMCore open func reset() { + isEnabled(true) shapeLayer?.removeAllAnimations() shapeLayer?.removeFromSuperlayer() shapeLayer = nil @@ -424,9 +425,15 @@ import MVMCore self.isRound = isRound } + if let enabled = dictionary["isEnabled"] as? Bool { + isEnabled(enabled) + } + if let actionMap = dictionary.optionalDictionaryForKey("actionMap") { actionBlock = { MVMCoreActionHandler.shared()?.handleAction(with: actionMap, additionalData: additionalData, delegateObject: delegateObject) } } + +// layoutIfNeeded() } }