1. New a project from "Empty Application"
2. Update AppDelegate.h
    - update "window" property as IBOutlet
3. Create AppWindow
    - New a xib named "AppWindow.xib"
    - Change the class of "File's Owner" to UIApplication
    - Add an object to "Objects" and change its class to "App Delegate"
    - Point "File's Owner" outlet named "delegate" to "App Delegate"
    - Point "App Delegate" outlet named "window" to "Window"
4. Point "Main Interface" to AppWindow in target setting
5. Update AppDelegate.m
    - remove code to alloc/init window
6. Create MainViewController
    - New a class from UIViewController with xib named "MainViewController"
    - Do something in the xib, say add a button
7. Update AppDelegate.m
    - load MainViewController in AppDelegate
      MainViewController *vc = [[MainViewController alloc...
      [self.window setRootViewController:vc];
    
 
No comments:
Post a Comment