Skip to content

Instantly share code, notes, and snippets.

@Sajjon
Created November 26, 2018 14:25
Show Gist options
  • Save Sajjon/4feb1f63313d7fea06c9b9fcf9868389 to your computer and use it in GitHub Desktop.
Save Sajjon/4feb1f63313d7fea06c9b9fcf9868389 to your computer and use it in GitHub Desktop.
Medium article: SLC part 1 - Coordinator
private extension AuthenticationCoordinator {
func toAuthentication() {
let viewModel = AuthenticateViewModel()
push(scene: Authenticate.self, viewModel: viewModel) { [unowned self] userIntendsTo in
switch userIntendsTo {
case .signUp: self.toSignIn()
case .signIn: self.toSignUp()
}
}
}
func toSignIn() { /* Push SignIn scene */ }
func toSignUp() { /* Push SignUp scene */ }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment