Skip to content

Instantly share code, notes, and snippets.

@laevandus
Created November 30, 2019 09:54
Show Gist options
  • Save laevandus/25c78e16c1a2d1de292dc1ae587299bc to your computer and use it in GitHub Desktop.
Save laevandus/25c78e16c1a2d1de292dc1ae587299bc to your computer and use it in GitHub Desktop.
import SwiftUI
final class AppFlowCoordinator: ObservableObject {
@Published var activeFlow: Flow = .login
func showLoginView() {
withAnimation {
activeFlow = .login
}
}
func showMainView() {
withAnimation {
activeFlow = .main
}
}
}
extension AppFlowCoordinator {
enum Flow {
case login, main
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment