/SwiftUIRouter-Examples

Examples of path-based routing using SwiftUI Router

Primary LanguageSwift

SwiftUI Router examples

SwiftUI Swift Xcode

This repository contains examples demonstrating how to utilize path-based routing using the SwiftUI Router library. These examples are not made to look pretty, but rather, are simplified to better showcase SwiftUI Router's features as well as giving examples on how to structure your routes and code.

The examples

Example Platforms1,2 Description
RandomUsers iOS, macOS A simple contacts-like app with 100 randomly generated users from randomuser.me. It demonstrates most of the features SwiftUI Router has to offer, how to organize routes and being able to redirect users to different parts of the app with a single button.
Swiping iOS A featureless app trying to replicate iOS's swipe-to-return navigation.
TabView iOS, macOS Example of how to combine SwiftUI Router and SwiftUI's builtin TabView.

1 SwiftUI Router is available on iOS (and iPadOS), macOS, tvOS and watchOS. Due to the interest of time the examples were only made and tested on iOS and macOS. 🙇
2 All projects are made for iOS 15+ or macOS 12+.