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 }
|
||||
|
||||
func findByID(view: UIView, _ id: String) -> UIView? {
|
||||
func find(view: UIView, by id: String) -> UIView? {
|
||||
|
||||
if view.accessibilityIdentifier == id {
|
||||
return view
|
||||
}
|
||||
if view.accessibilityIdentifier == id { return view }
|
||||
|
||||
for v in view.subviews {
|
||||
if let a = findByID(view: v, id) {
|
||||
return a
|
||||
}
|
||||
if let aView = find(view: v, by: id) { return aView }
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
return findByID(view: window, identifier)
|
||||
return find(view: window, by: identifier)
|
||||
}
|
||||
}
|
||||
|
||||
@ -453,8 +453,8 @@ import UIKit
|
||||
entryFieldModel.isValid = true
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user