adjustments
This commit is contained in:
parent
1e4963f58e
commit
5b42466c7c
@ -15,21 +15,17 @@ extension UIView {
|
|||||||
|
|
||||||
guard let window = UIApplication.shared.keyWindow else { return nil }
|
guard let window = UIApplication.shared.keyWindow else { return nil }
|
||||||
|
|
||||||
func findByID(view: UIView, _ id: String) -> UIView? {
|
func find(view: UIView, by id: String) -> UIView? {
|
||||||
|
|
||||||
if view.accessibilityIdentifier == id {
|
if view.accessibilityIdentifier == id { return view }
|
||||||
return view
|
|
||||||
}
|
|
||||||
|
|
||||||
for v in view.subviews {
|
for v in view.subviews {
|
||||||
if let a = findByID(view: v, id) {
|
if let aView = find(view: v, by: id) { return aView }
|
||||||
return a
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return findByID(view: window, identifier)
|
return find(view: window, by: identifier)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -453,8 +453,8 @@ import UIKit
|
|||||||
entryFieldModel.isValid = true
|
entryFieldModel.isValid = true
|
||||||
entryFieldModel.text = ""
|
entryFieldModel.text = ""
|
||||||
|
|
||||||
if let view = UIView.findByAccessibility(identifier: fieldKey), let moleculeView = view as? MoleculeViewProtocol {
|
DispatchQueue.main.async { [self] in
|
||||||
DispatchQueue.main.async { [self] in
|
if let view = UIView.findByAccessibility(identifier: fieldKey), let moleculeView = view as? MoleculeViewProtocol {
|
||||||
moleculeView.set(with: entryFieldModel, delegateObjectIVar, nil)
|
moleculeView.set(with: entryFieldModel, delegateObjectIVar, nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user