Design question - code separation in files

Currently, the first time he use the app, the user must go through 3 or 4 ViewController to setup everything . I think I have a way to Visually put everything in one ViewController. The user can have multiple setup and changing it make more sense to the user if it is all in one ViewController.

This new ViewController would still segue to change some part for setting more complex thing but it will still have to handle everything.


But :-)


all that code in one ViewController will be too long and will have too many func for my taste

It will be a nightmare to modify it.


Is there a way to separate this code into multiple files


- it does not seems right to have long line on sub class just to keep everything in separate file

- I tried to look at Extension, and it does not seem to work well in this case.


exemple, i user have some textfield to fill, could this part be into a separeted file that could Almost be reuse :-)

Replies

Curious....are you using one large storyboard, or more than one? One target or multiple?


Is your main concern UI flow for the user, or. your workload when attempting to update/maintain the app in the future? Because....


'design question' (assuming you mean UI) and 'code separation' can be two different priorities. I'd focus on UI first, then code style, which can vary depending on the dev and how they like to work, etc. If more work for the dev means less work for the user, so be it.


About UI design, see: https://developer.apple.com/design/human-interface-guidelines/ios/app-architecture/navigation/

after reading all your coment, i did somehting i never did before.

i created a Fake app with just UIViewController with segue, and tried it.


i realize many thing about what a user want to know and even found out thing about my app design.

I was so eager to start coding that I though i could think those thing while i progress.


i dont think this one will be the last interface design for the app, but it is a good step.

Wishing you success...stick with it and good luck.