Ios Startup Toturial By Holydancer

http://blog.csdn.net/holydancer/article/details/7384325

create a single view application

files:

main.m
AppDelegate.h/m
ViewController.h/m/xib

UIKit execution order:

main()
UIApplication() —> application:didFinishLaunching:
event loop —> events processing
exit sys notification —> application:WillTerminate:
application exit

AppDelegate:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    /// create UIWindow, init with frame bounds of UIScreen
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
 
    // Override point for customization after application launch.
 
    /// create ViewController, init with Nib file
    self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
 
    /// set root view controller to viewController member variable 
    self.window.rootViewController = self.viewController;
 
    /// make key and visible
    [self.window makeKeyAndVisible];
 
    return YES;
}