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

how to navigate to another UIViewController, choose something and return it to the first VC? #10

Closed
haemi opened this issue Mar 28, 2019 · 2 comments

Comments

@haemi
Copy link

haemi commented Mar 28, 2019

On my first UIViewController, I have a button which leads to another VC with a list of entries. When I select an entry on this, I would like to return it back to the first UIViewController.

But currently I really have problems implementing this with this architecture...

@cosminstirbu
Copy link
Contributor

Hi,

You can use the delegate pattern.
For instance AddBookPresenter notifies its delegate (BooksPresenter) that a Book was added.

You can do something similar, notifying that an entry was selected, by passing back either the entry itself or the selected index path.

Regards,
Cosmin

@haemi
Copy link
Author

haemi commented Apr 11, 2019

sorry, didn't see that you already answered long time ago... thanks a lot!

I'm using this architecture in my current project, would love to open issues if I have questions/discussion material, if that's ok for you!

@haemi haemi closed this as completed Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants