Coordinator Pattern for iOS 12 and 13

As the awesome Swift master Paul puts it:
Using the coordinator pattern in iOS apps lets us remove the job of app navigation from our view controllers, helping make them more manageable and more reusable, while also letting us adjust our app's flow whenever we need. 
It is a darn useful pattern and something that since I learned about it, I used it in all my apps. Paul also released an advanced version as well of the original tutorial.

Patrick has a slightly different implementation of the same pattern and although I prefer Paul's approach (only slightly different in character) there are some nuances in his post that are definitely worth reading.

All that magic is challenged with iOS 13 because of the introduction of the UISceneDelegate. I hammered my head a few times before I got the clue of what had to be changed given that the window object is now no longer created in the AppDelegate but the SceneDelegate.

Mark describes the difference very well in this post. Something that I fail all the time to remember is to delete the content of the Main Interface, so don't forget that.

Comments

Popular posts from this blog

Build an independent watch app - PART IV

Build an independent watch app - Part II

It's all matter of angles, in life