ekazaev / route-composer

Protocol oriented, Cocoa UI abstractions based library that helps to handle view controllers composition, navigation and deep linking tasks in the iOS application. Can be used as the universal replacement for the Coordinator pattern.
MIT License
896 stars 63 forks source link

Keywindow fix #80

Closed doviz closed 2 years ago

ekazaev commented 2 years ago

@doviz Hi. I see you closed the PR. But what is this about? I assume that it is about dealing with multiwindows environment? I did not really use route-composer for that purpose. Can we try to resolve it together? BTW, You can use your own WindowProvider everywhere if its necessary using RouteComposerDefaults.

doviz commented 2 years ago

Hi Eugene.

Thanks for reaching out. I created a small fix but it is half baked to see how it works on our end.

Basically, we have new code in our app that shows UI in new windows. This means our app can have multiple windows at any given point. So the default KeyWindowProvider which looks for first window where isKeyWindow was true was not going to work since we don’t want to route in the new windows.

Our app has many routes, finders and factories. Is there a way to override the default KeyWindowProvider without having to explicitly pass a new instance to every route or finder?

Thanks,

Dov

On 14 Feb 2022, at 14:29, Eugene Kazaev @.***> wrote:

@doviz https://github.com/doviz Hi. I see you closed the PR. But what is this about? I assume that it is about dealing with multiwindows environment? I did not really use route-composer for that purpose. Can we try to resolve it together? BTW, You can use your own WindowProvider everywhere if its necessary.

— Reply to this email directly, view it on GitHub https://github.com/ekazaev/route-composer/pull/80#issuecomment-1039031231, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK33IYDKCYR2PYHN4V2ZRXTU3DYUFANCNFSM5OLGEM7Q. You are receiving this because you were mentioned.

Encryption verified by Paubox https://www.paubox.com/ - HITRUST CSF Certified

--

This email and any attachments thereto may contain private, confidential, and privileged material for the sole use of the intended recipient.  Any review, copying, or distribution of this email (or any attachments thereto) by others is strictly prohibited.  If you are not the intended recipient, please contact the sender immediately and permanently delete the original and any copies of this email and any attachments thereto.


Secured by Paubox - HITRUST CSF certified https://www.paubox.com

ekazaev commented 2 years ago

@doviz Using RouteComposerDefaults and setting your WindowProvider there will allow you to propagate it everywhere. If you can create a test project that contains multiwindow routing - would love to dedicate sometime to find a better approach. Route composer originally were build for a single window approach as there were no multiwindows at that time