use a Coordinator instead 👇
NavigationCoordinator will not be updated as of iOS25.
⭐️⭐️⭐️⭐️⭐️
I would like to give my thanks to Alex for making the complex topic of iOS development more understandable. His tutorials, particularly those suggested by my colleague, were instrumental in clarifying the fundamental concepts of iOS development for me as a junior developer. Additionally, his comprehensive resources on Navigation Coordinator in SwiftUI significantly enhanced my ability to write clean and maintainable code. His contributions have been invaluable in my journey as an iOS developer.
Here's a list of features Navigation Coordinator has to offer:
👉 Simple and unified API
👉 Decouple navigation logic from your views 🤯
👉 Supports iOS14+, macOS11+, tvOS14+, watchOS7+ and visionOS1+
👉 Supports SwiftUI2, SwiftUI3, SwiftUI4, SwiftUI5 and SwiftUI6 💎
👉 Supports Dependency Injection (move data between views easily)
👉 Access the navigation with the @Environment
👉 Easily use navigation within View Models too (MVVM)
👉 Perfect for deep links
👉 Works with TabView
👉 Easily pop to root
👉 Can pop back to any view
👉 EASY 3 step setup
👉 Supports .link, .sheet and .fullScreenCover navigation
👉 Has .onComplete & .onDismiss callbacks
👉 Works with async/await
👉 Example Xcode Project
👉 100% Documented
Set all your Destinations in one place.
Use the NavigationRoot to set your root view.
Access the built in navigation through the environment.
Push a view. Optionally add onComplete and/or onDismiss callbacks. Select the push type. Use in an async/await environment.
Pop to any view in any way you want to.
Not that common but very useful if needed.
Deep link to any view. Use completion handlers or async/await. And of course listen to the onDismiss callback if you wish to.
v.4.0.3+
Instead of TabView use TabNavigationRoot. Choose the initial tab to be shown.
Switch tabs easily with the tabNavigation environment.
Every function, every variable, every line of code is thoroughly documented, so you get peace of mind what Navigation Coordinator does under the hood.
onAppear bug fix
Rewritten from the ground up to support iOS17+ with NavigationStack
Supports tab switches 🤩
Sheet swipe bug fix
Fixed onAppear triggered twice upon push
Added example of how you can use navigation in a view model
🚨 Improved API
Access the navigation through the @Environment
Simpler Destination setup
One step pop for multiple link pushes
Improved Demo to showcase dependency injection
🚨 API change: made it even simpler
Added onDismiss
iOS14+ ・ macOS11+・ tvOS14+・ watchOS7+ ・ visionOS1+