XCoordinator | Powerful navigation library for iOS | iOS library
kandi X-RAY | XCoordinator Summary
kandi X-RAY | XCoordinator Summary
In general, an app's structure is defined by nesting coordinators and view controllers. You can transition (i.e. push, present, pop, dismiss) to a different coordinator whenever your app changes to a different flow. Within a flow, we transition between viewControllers. Example: In UserListCoordinator.prepareTransition(for:) we change from the UserListRoute to the UserRoute whenever the UserListRoute.user route is triggered. By dismissing a viewController in UserListRoute.logout, we additionally switch back to the previous flow - in this case the HomeRoute. To achieve this behavior, every Coordinator has its own rootViewController. This would be a UINavigationController in the case of a NavigationCoordinator, a UITabBarController in the case of a TabBarCoordinator, etc. When transitioning to a Coordinator/Router, this rootViewController is used as the destination view controller.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of XCoordinator
XCoordinator Key Features
XCoordinator Examples and Code Snippets
Community Discussions
Trending Discussions on XCoordinator
QUESTION
I'm trying to understand how to use XCoordinator to set a root view controller from a child coordinator.
I have an app delegate that runs the app coordinator.
The pattern I have is:
AppDelegate - App Coordinator --- Main Menu Coordinator --- Game Coorinator
(see image)
The app coordinator should not know about specific view controllers directly because I believe the view controllers should managed by their own respective coordinator.
Thus, the app coordinator should manage the flow between the coordinators and set a root, initial coordinator.
Sadly, the screen is blank, and keeps complaining that I can't as "Pushing a navigation controller is not supported".
But if I directly instantiate the view controller inside my appcoordinator its fine and I don't know why.
...ANSWER
Answered 2020-Jun-01 at 18:45I am doing smth like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install XCoordinator
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page