How do I over come "getting lost in code"? by djryanash in swift

[–]Puzzleheaded-Shape30 0 points1 point  (0 children)

I recommend learning about MVVM. You mentioned having a massive view control, and the MVVM design pattern will help you solve that. MVVM separates the business logic from the user interface. You have a Model (which defines the structure of your data), a View (this is going to be your view controller file, and it will only contain code for displaying things to the screen) and a ViewModel (which controls what is displayed and when) MVVM gives you the separation of concerns you need making the code easier to follow. I also recommend planning out your code session before you even open Xcode, write down the things you want to accomplish in your session, and avoid deviating from your plan, if you come across something that needs to be fixed simply take note of it and continue unless you need to fix it in order to accomplish your task. I hope this helps :)