What problem does it solve?
SwiftNavigation provides a lightweight, reusable set of navigation primitives to simplify state-driven navigation across SwiftUI and UIKit, reducing boilerplate and keeping UI in sync with app state.
Core Features & Use Cases
- AlertState: manage alert presentation and data consistently across screens.
- ConfirmationDialogState: manage confirmation dialogs with predictable state transitions.
- UIBinding: create observable bindings to reflect model state in the UI.
- Cross-platform compatibility: works across Apple platforms with Swift.
- Use Case: Build a cohesive multi-screen flow with consistent alerts and dialogs using a single, testable API.
Quick Start
Add SwiftNavigation core to your Xcode project, then start by declaring a SwiftNavigation.AlertState in your view model and present an alert from a user action. Use Swift Package Manager to fetch the package or integrate manually. Create a simple SwiftUI view that toggles the alert state to show an alert.