File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,25 @@ class WatchedViewModel: Stepper {
194
194
}
195
195
```
196
196
197
+ ### Is it possible to coordinate multiple Flows ?
198
+
199
+ Of course, it is the aim of a Coordinator. As a Flow is a Presentable, a Flow can launch one other Flow or even several other Flows.
200
+
201
+ For instance, from the WishlistFlow, we launch the SettingsFlow in a popup.
202
+
203
+ ``` swift
204
+ private func navigateToSettings () -> [Flowable] {
205
+ let settingsStepper = SettingsStepper ()
206
+ let settingsFlow = SettingsFlow (withService : self .service , andStepper : settingsStepper)
207
+ Flows.whenReady (flow : settingsFlow, block : { [unowned self ] (root : UISplitViewController) in
208
+ self .rootViewController .present (root, animated : true )
209
+ })
210
+ return [Flowable (nextPresentable : settingsFlow, nextStepper : settingsStepper)]
211
+ }
212
+ ```
213
+
214
+ For a more complex case, see the ** MainFlow.swift** file in which we handle a UITabBarController.
215
+
197
216
### How to bootstrap the RxFlow process
198
217
199
218
The coordination process is pretty straightfoward and happens in the AppDelegate.
You can’t perform that action at this time.
0 commit comments