QuickBirdEng / XCoordinator

🎌 Powerful navigation library for iOS based on the coordinator pattern
MIT License
2.25k stars 177 forks source link

Access the current used router #215

Closed ghadeermohameedelmahdy closed 2 years ago

ghadeermohameedelmahdy commented 2 years ago

how to get current router from any file, to enable present the root tabviewcontroller for example?

pauljohanneskraft commented 2 years ago

There is no such functionality as of now in XCoordinator. You can, however, use Service Locator / Dependency Injection techniques to solve this issue. There is also no such thing as the "currently used router", as any router in existence might trigger a transition at any time (as is the case with UIKit's UIViewController).