I want to replace a view with another view using SwiftUI.
Currently I use either a NavigationView or .sheet to transition to a new view and that works fine stacking views.
However I have not found a way to completely replace a view with another view. For example when the user first lands on the App it will give an option to sign in or create a new account. I want either option to replace the landing view, not present on top of it.
The analogy to pre swiftUI would be to replace the rootView.
https://stackoverflow.com/questions/66609458/how-do-i-change-the-root-view-with-swiftui March 13, 2021 at 10:04AM
没有评论:
发表评论