Swiftpack.co - anioutkazharkova/swiftuinavigator as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by anioutkazharkova.
anioutkazharkova/swiftuinavigator 1.0.0
Small lightweight library to provide pure SwiftUI navigation in app
⭐️ 3
🕓 2 years ago
iOS
.package(url: "https://github.com/anioutkazharkova/swiftuinavigator.git", from: "1.0.0")

SwiftUI Navigator

GitHub tag (latest SemVer) GitHub last commit License GitHub stars GitHub forks GitHub watchers GitHub followers

Twitter URL

Buy Me A Coffee donate button

Small lightweight library to provide pure SwiftUI navigation in app

How to use:

  1. Add SwiftUI via PackageManager
  2. Add import to your files
import SwiftUINavigator
  1. Make your screen Views to implement IItemView protocol
struct SampleView: View, IItemView {
  var listener: INavigationContainer?
  
 } 
  1. Call navigation methods of listener to make a magic:
 self.listener?.push(view: SecondView())

Profit!

To provide back navigation:

To return to previous screen:

 self.listener?.pop()

To return to root:

self.listener?.popToRoot()

GitHub

link
Stars: 3
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

First release
2 years ago

First release

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics