Make vibrant button highlight more quickly
This commit is contained in:
parent
bac205ef84
commit
c771bd651c
|
@ -30,4 +30,19 @@ class VibrantButton: UIButton {
|
|||
}
|
||||
}
|
||||
|
||||
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
|
||||
isHighlighted = true
|
||||
super.touchesBegan(touches, with: event)
|
||||
}
|
||||
|
||||
override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
|
||||
isHighlighted = false
|
||||
super.touchesEnded(touches, with: event)
|
||||
}
|
||||
|
||||
override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
|
||||
isHighlighted = false
|
||||
super.touchesCancelled(touches, with: event)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue