flipped off by default but only set if "touchUpInside" publisher is set
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
c6ffa5736d
commit
04a5fddf48
@ -29,7 +29,7 @@ open class Control: UIControl, Handlerable, ViewProtocol, Resettable {
|
||||
|
||||
open override var isSelected: Bool { didSet { didChange() } }
|
||||
|
||||
internal var enabledHighlight: Bool = true
|
||||
internal var enabledHighlight: Bool = false
|
||||
|
||||
var isHighlightAnimating = false
|
||||
open override var isHighlighted: Bool {
|
||||
|
||||
@ -17,6 +17,12 @@ public final class UIControlSubscription<SubscriberType: Subscriber, Control: UI
|
||||
public init(subscriber: SubscriberType, control: Control, event: UIControl.Event) {
|
||||
self.subscriber = subscriber
|
||||
self.control = control
|
||||
|
||||
//allow highlight for VDS.Controls on "onClick" events
|
||||
if let c = control as? VDS.Control, event == .touchUpInside {
|
||||
c.enabledHighlight = true
|
||||
}
|
||||
|
||||
control.addTarget(self, action: #selector(eventHandler), for: event)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user