diff --git a/VDS/Classes/Control.swift b/VDS/Classes/Control.swift index 90dae4e5..d5af7f46 100644 --- a/VDS/Classes/Control.swift +++ b/VDS/Classes/Control.swift @@ -29,8 +29,24 @@ open class Control: UIControl, Handlerable, ViewProtocol, Resettable { open override var isSelected: Bool { didSet { didChange() } } - open override var isHighlighted: Bool { didSet { updateView() } } - + var isHighlightAnimating = false + open override var isHighlighted: Bool { + didSet { + if isHighlightAnimating == false { + isHighlightAnimating = true + UIView.animate(withDuration: 0.1, animations: { [weak self] in + self?.updateView() + }) { [weak self] _ in + //you update the view since this is typically a quick change + UIView.animate(withDuration: 0.1, animations: { [weak self] in + self?.updateView() + self?.isHighlightAnimating = false + }) + } + } + } + } + open override var isEnabled: Bool { get { !disabled } set {