Proper replacement for introspectNavigationController #386
-
I'am working on rafactoring of the module and updated to swiftui-introspect 1.1.1 from 0.1.1. What is proper migration for introspectNavigationController in a such case:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Also note, storing it in |
Beta Was this translation helpful? Give feedback.
-
@davdroman I saw this, but unfortunately it not working in my case( I've refactored this part as follows:
And breakpoin shows that it's not called. So navigationController is nil and that is way it brokes part of the app's functionality. Maybe I've missed something? |
Beta Was this translation helpful? Give feedback.
Is your navigation view inside
content
? If not, then your view is inside the navigation view instead. If that's the case, then you need to override the lookup scope to introspect outwardly to find ancestors like this: