Doesn't work with Peek & Pop gesture
I did implement the gesture in our app and faced the bug: the app won't continue the navigation process. Reproduced with the demo app.

Hi @Jauzee
Can you provide a full example please ?
Hi @twittemb. Sorry for the late response, I missed your message.
I forked the repo and changed the WishlistViewController.swift file here: https://github.com/Jauzee/RxFlow/tree/develop
Thanks for your repo @Jauzee
In the current version, RxFlow is not suited for peek n pop usage.
In the RxFlow philosophy the ViewControllers are created by the Flows. Peek n pop needs to implement the creation of the destination ViewController in its delegate (aka the WishlistViewController) ... unfortunately it is not compatible with the current implementation of RxFlow.
I can't see a good way to do this because the aim of the Coordinator pattern is to hide the ViewControllers creation from the previous ViewControllers.
Do you have a good idea on this ?
@twittemb no, I didn't investigate it yet.
In our app I only create a view controller for the preview. So in the delegate callback I only call some method, which triggers new step in a Flow. I can't understand why the Flow doesn't receive further steps. It opens the view controller which was previewed, but then the navigation stops.
Hi @Jauzee
You can consider RxFlow, and all the coordinator pattern based frameworks as replacement for the segue based navigation.
Peek and pop requires a navigation in 2 phases (VC creation and VC commit). It is a very special way of navigating.
Hi @twittemb. I understand that, but you can commit any view controller, you're not limited to present the view controller that was created for a preview. You can just throw it out and call your new Step, so I believe there's a way to handle this. Can you please explain a little why it doesn't handle new Steps, what's the key difference here?
@Jauzee Hi! I registered another issue, which I traced to the same line in Coordinators.swift but with different observed effect (missing section titles in some tables). As it turned out my problem was I didn't clear the existing delegate/datasource for tables (debug version of RxSwift has the asserts for this, but I was using release version). So the behavior is definitely related to rxVisible/displayed implementation and the way RxCocoa implements delegate interceptors. Just my $.02
Thank you very much for your feedback @ssaluk. It can be helpful.
You can actually emit steps, but after some delay. I just tried
func previewingContext(_ previewingContext: UIViewControllerPreviewing, commit viewControllerToCommit: UIViewController) {
Observable<Void>.just(())
.delay(0.5, scheduler: MainScheduler.asyncInstance)
.map { _ in AppStep.transactionDetail }
.bind(to: viewModel.step)
.disposed(by: disposeBag)
}
and and didn't stop navigation process.
This issue has not received any recent updates. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please leave a comment below and auto-close will be canceled.
This issue has automatically been closed due to inactivity.