Confused about a few things (n00b questions)
Hello everyone,
I'm new to iPhone/object-oriented programming, and after reading/watching multiple tutorials, I still have basic questions while I'm working on my very first application.
1) I have a AppDelegate and a ViewController class... but no View class! I just selected "View-based Application" and it seems to be the default project layout. Why is MainWindow.xib linking to ViewController.xib? Shouldn't ViewController.xib link to a View.xib? I'm asking this because I want to draw stuff on my view, and I read somewhere that I have to put drawing functions in the drawRect: method of the VIEW. Not the view controller. Again please correct me if I'm wrong.
2) Where is the main application code supposed to be? For some reason I started building everything in my view controller class, is this correct or not? It works, but I just ain't sure. The main variables of my program are instance variables of the view controller, the main functions (like load, save, etc.) are its instance methods, etc. The main initialization occurs in the viewDidLoad method. I'm pretty sure it's not the normal way.
Thank you for your help!
Benoit
|