-
Notifications
You must be signed in to change notification settings - Fork 389
Transitioning from Introspect to SwiftUI-Introspect: help Needed #403
Unanswered
Meshaal-Alruwaili
asked this question in
Q&A
-
How can i create a similar function in SwiftUI-Introspect.
private func tableView(entry: UIView) -> UITableView? {
// Search in ancestors
if let tableView = Introspect.findAncestor(ofType: UITableView.self, from: entry) {
return tableView
}
guard let viewHost = Introspect.findViewHost(from: entry) else {
return nil
}
// Search in siblings
return Introspect.previousSibling(containing: UITableView.self, from: viewHost)
}
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment