Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/frzi/swiftuirouter-examples
Examples of path-based routing using SwiftUI Router
https://github.com/frzi/swiftuirouter-examples
examples router routing swiftui
Last synced: 4 days ago
JSON representation
Examples of path-based routing using SwiftUI Router
- Host: GitHub
- URL: https://github.com/frzi/swiftuirouter-examples
- Owner: frzi
- Created: 2021-11-27T14:55:42.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-14T07:55:03.000Z (over 1 year ago)
- Last Synced: 2024-12-23T00:50:23.110Z (12 days ago)
- Topics: examples, router, routing, swiftui
- Language: Swift
- Homepage:
- Size: 1.88 MB
- Stars: 7
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SwiftUI Router examples
[![SwiftUI](https://img.shields.io/badge/SwiftUI-blue.svg?style=for-the-badge&logo=swift&logoColor=black)](https://developer.apple.com/xcode/swiftui)
[![Swift](https://img.shields.io/badge/Swift-5.5-orange.svg?style=for-the-badge&logo=swift)](https://swift.org)
[![Xcode](https://img.shields.io/badge/Xcode-13-blue.svg?style=for-the-badge&logo=Xcode&logoColor=white)](https://developer.apple.com/xcode)This repository contains examples demonstrating how to utilize path-based routing using the [SwiftUI Router](https://github.com/frzi/SwiftUIRouter) 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](RandomUsers) | iOS, macOS | A simple contacts-like app with 100 randomly generated users from [randomuser.me](https://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](Swiping) | iOS | A featureless app trying to replicate iOS's swipe-to-return navigation. |
| [TabView](TabViewRouting) | 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+.