Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Child View Controllers with own flows #28

Open
grafele opened this issue Feb 8, 2018 · 5 comments
Open

Child View Controllers with own flows #28

grafele opened this issue Feb 8, 2018 · 5 comments

Comments

@grafele
Copy link
Contributor

grafele commented Feb 8, 2018

Hi!

I wanted to ask if child view controllers with their own flows are currently supported by RxFlow. If I understand the source code right, the FlowCoordinator won't be removed until it's parent was dismissed. I can think about cases where the parent won't be dismissed at all and we add/remove child view controllers continuously. That would lead to a situation with many FlowCoordinators lying around without a way of deleting them.

Please correct me if I'm wrong.

@grafele grafele changed the title Child View Controllers with an own flow Child View Controllers with own flows Feb 8, 2018
@twittemb
Copy link
Collaborator

twittemb commented Feb 8, 2018

Hi,

A FlowCoordinator is removed when its associated root ViewController is dismissed. Indeed, if the root is not dismissed the FlowCoordinator will stay around.

Honestly, I have never tried RxFlow with Child ViewControllers. It is a good studying case. If I find a little time I will try it. If you try it on your side first, please come back to me within this issue.

@grafele
Copy link
Contributor Author

grafele commented Feb 8, 2018

Ok, good to know. I plan to use it in our current project and I will create a pull request when I implement the necessary changes. I really like RxFlow!

@twittemb
Copy link
Collaborator

twittemb commented Feb 9, 2018

Hi @grafele

I'd like to try this Child ViewController thing :-) Can you describe what you have in mind in terms of navigation between these Child ViewControllers a little bit ? We can compare our results at the end ...

thx.

@grafele
Copy link
Contributor Author

grafele commented Feb 9, 2018

Hi @twittemb

There are actually two things we need to add to get child view controller support:

  1. Clean up should work with them as well. But that's super easy.
  2. We need a way to pass the container view into the navigation step. It's already possible to add it to the enum case for that step, but I think we need a better abstraction there.

I would try to combine this with the case of popovers or other dialogs that need a source view. We need a way to have access to these views in the Flow. Don't have any idea yet how to do it without having the view model know about the view.

@Sajjon
Copy link

Sajjon commented Feb 12, 2018

@grafele it feels like you are asking for something relating to what I am asking for in #24

Have a look at my example, which works but executes with nasty warnings https://github.com/Sajjon/RxFlowExample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants