fixed highlight bug in entry field
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
abda0b7402
commit
42e2c5673f
@ -29,10 +29,12 @@ open class Control: UIControl, Handlerable, ViewProtocol, Resettable {
|
|||||||
|
|
||||||
open override var isSelected: Bool { didSet { didChange() } }
|
open override var isSelected: Bool { didSet { didChange() } }
|
||||||
|
|
||||||
|
internal var enabledHighlight: Bool = true
|
||||||
|
|
||||||
var isHighlightAnimating = false
|
var isHighlightAnimating = false
|
||||||
open override var isHighlighted: Bool {
|
open override var isHighlighted: Bool {
|
||||||
didSet {
|
didSet {
|
||||||
if isHighlightAnimating == false {
|
if isHighlightAnimating == false && enabledHighlight {
|
||||||
isHighlightAnimating = true
|
isHighlightAnimating = true
|
||||||
UIView.animate(withDuration: 0.1, animations: { [weak self] in
|
UIView.animate(withDuration: 0.1, animations: { [weak self] in
|
||||||
self?.updateView()
|
self?.updateView()
|
||||||
|
|||||||
@ -163,6 +163,7 @@ open class EntryField: Control, Accessable {
|
|||||||
open override func setup() {
|
open override func setup() {
|
||||||
super.setup()
|
super.setup()
|
||||||
|
|
||||||
|
enabledHighlight = false
|
||||||
isAccessibilityElement = true
|
isAccessibilityElement = true
|
||||||
accessibilityTraits = .button
|
accessibilityTraits = .button
|
||||||
addSubview(stackView)
|
addSubview(stackView)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user