I’m new to developing with xCode and Objective C, and I have a simple question. What is the point of having seperate class files for each scene in a storyboard.
My Question: Why not use the default ViewController.m and ViewController.h class for every scene in your storyboard. Are there any disadvantages of using the same class for multiple scenes other than just being plain organized?
Here is a picture of where you would enter what class a specific scene is using…
ViewController is a class that manages a hierarchy of views (aka..1 screen of the application)
when you have multiple screens that do different things its a lot better to use separate view controllers (simpler too)
besides ..if you use the same class for 2 or more completely different screens Apple wont accept your app to be submitted to the App Store because it doesn’t follow M-C-V model (happen to me) so its better to separate your code now..when you write it rather than separate it after you get rejected…and have to rewrite most of the app
plus..its the logistic thing..having methods from different classes in the same file its confusing as hell
also…you can’t implement -viewDidLoad multiple times for different screens
and so on..i could go for some time listing reasons 🙂