-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Labels
Description
UITabBarController allow to have multiple navigation stacks in each tabs. For example :
On the previous image we can see tat we have 4 different stacks at the same time :
A / Y /B / X /C /D /
The NavigationState design is :
public struct NavigationState {
public init()
public var route: Route
public var routeSpecificState: [ReSwiftRouter.RouteHash : Any]
}I'm struggling to find a way to use the current implementation while maintaining the native behaviour of the UITabBarController. The idea is to have the following scenario to work properly
| Sequence | NavigationState.route | Next user action |
|---|---|---|
| 1 | / | Tab on A in tab bar |
| 2 | / A | Tap on Y in A |
| 3 | / A / Y | Tab on B in tab bar |
| 4 | / B | Tap on A in tab bar |
| 5 | / A / Y |
Given the current implementation, NavigationState.route in the 5th sequence would be / A instead of / A / Y because the user action in the 4th sequence is destructive.
It seems that we should support non-linear navigation. Maybe more something like a route tree along with the current route in that tree.
DivineDominion, hasayakey, shnjp, egorvoronov and snowtema
