Closed amineahmmouch closed 1 year ago
You need to make sure that your NavigationCoordinatable
instances are wrapped in a NavigationViewCoordinator
.
e.g:
// 1 - wherever you instantiate DefaultSignInCoordinator
NavigationViewCoordinator(DefaultSignInCoordinator())
// 2 - if you want to push views in DefaultForgetPasswordCoordinator, also needs to be wrapped
func makeForgetPassword() -> NavigationViewCoordinator<DefaultForgetPasswordCoordinator> {
NavigationViewCoordinator(DefaultForgetPasswordCoordinator())
}
You are right. I didn't wrap the sign in coordinator in NavigationViewCoordinator.
NavigationViewCoordinator(DefaultSignInCoordinator()).view()
Thank you so much for your help. Have a nice day.
Hi, i just discover Stinsen and i think it's the best implemetation of Coordinator pattern in SwiftUI. Congratulations.
Here is my problem,
I have two views SignInView and ForgotPasswordView, and i want to perform push from SignInView to ForgetPassword, but its doesn't perform push animation neither it doesn't switch to the second view (ForgetPasswordView). Note that .modal and .fullscreen transitions work the problem occur just for .push.
Did i implement the flow wrong ?
Thanks in advance.
Here is my code :