How can I organize my code in project, so I can easily change Root View from every place of my app?
Is it possible to do it inside @main struct MyApp: App { ... } or I need to create additional intermediate RootView struct?
How can I organize my code in project, so I can easily change Root View from every place of my app?
Is it possible to do it inside @main struct MyApp: App { ... } or I need to create additional intermediate RootView struct?
Copyright © 2021 Jogjafile Inc.
Found a solution without any additional stuff(e.g. RootView struct). I have here example project with 3 screens, all of them can switch rootView from
Appstruct via NavigationManager.Main App struct:
NavigationManager class:
ContentView struct:
MainView struct:
SettingsView struct: