diff --git a/VDS/Classes/Control.swift b/VDS/Classes/Control.swift index 2823bb80..35862574 100644 --- a/VDS/Classes/Control.swift +++ b/VDS/Classes/Control.swift @@ -84,18 +84,16 @@ open class Control: UIControl, Handlerable, ViewProtocol, Resettable, UserInfoab } } -// /// Override to deal with setNeedsUpdate() -// open override var isEnabled: Bool { -// get { !disabled } -// set { -// if disabled != !newValue { -// disabled = !newValue -// } -// isUserInteractionEnabled = isEnabled -// setNeedsUpdate() -// } -// } -// + /// Override to deal with setNeedsUpdate() + open override var isEnabled: Bool { + get { !disabled } + set { + if disabled != !newValue { + disabled = !newValue + } + } + } + //-------------------------------------------------- // MARK: - Initializers //-------------------------------------------------- diff --git a/VDS/Components/Buttons/Button/ButtonBase.swift b/VDS/Components/Buttons/Button/ButtonBase.swift index 00eed2db..d21af3b8 100644 --- a/VDS/Components/Buttons/Button/ButtonBase.swift +++ b/VDS/Components/Buttons/Button/ButtonBase.swift @@ -80,6 +80,16 @@ open class ButtonBase: UIButton, Buttonable, Handlerable, ViewProtocol, Resettab } } + /// Override to deal with setNeedsUpdate() + open override var isEnabled: Bool { + get { !disabled } + set { + if disabled != !newValue { + disabled = !newValue + } + } + } + open override var state: UIControl.State { get { var state = super.state