canopas / UIPilot

The missing typesafe SwiftUI navigation library
https://canopas.github.io/UIPilot
MIT License
309 stars 27 forks source link

Can this support be added? #49

Open rahul-furlenco opened 1 year ago

rahul-furlenco commented 1 year ago

To check if a UIViewController is present in the navigation stack and then push or pop to it accordingly. Will be appreciated if yo you can provide a solution.

cp-amisha-i commented 9 months ago

Hello @rahul-furlenco, Yes, it's possible, just need to check with the pilot's route array whether the given view exists or not in the route array. i.e: if pilot.routes.contains(.Home) { ... }