Created
November 30, 2019 09:55
-
-
Save laevandus/45bb070f6b4e1452f6b9e1e07964e388 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct RootView: View { | |
@EnvironmentObject var appFlowCoordinator: AppFlowCoordinator | |
@ViewBuilder | |
var body: some View { | |
ZStack { | |
Color.black.edgesIgnoringSafeArea(.all) | |
if appFlowCoordinator.activeFlow == .main { | |
ContentView().transition(.asymmetric(insertion: .scale, removal: .opacity)) | |
} | |
else if appFlowCoordinator.activeFlow == .login { | |
LoginView().transition(.asymmetric(insertion: .slide, removal: .opacity)) | |
} | |
else { | |
EmptyView() | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment