when you first create a project, you will notice there are 4 file
AppDelegate.h
AppDelegate.m
ViewController.h
ViewController.m
let me explain using noob way, the whole process start from AppDelegate.m
- (void) applicationDidFinishLaunching:(UIApplication*)application
{
This method mean: WHEN YOUR APP FINISH LAUNCHING, WHAT SHOULD YOU DO NEXT
normally we will put your viewController here to tell the app to launch it with your view
// make the OpenGLView a child of the view controller
[viewController setView:glView];
// make the View Controller a child of the main window
[window addSubview: viewController.view];
well actually both is an object that you declared on the AppDelegate.h
UIWindow *window;
RootViewController *viewController;
-The window is the root view in the view hierarchy
-It is the window to show to view
Then what is the ViewController???
-It is the area where you control everything, all the timer and action and graphics and stuff
I guess I can only help so much since I am a noob myself, but keep learning, one day you will become god of programming
No comments:
Post a Comment