/ Published in: Objective C
Inside the `AppDelegate`, the `didFinishLaunchingWithOptions` method can be used to just create and use a custom View Controller class.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // create an instance of the view controller MyViewController *vc = [[MyViewController alloc] init]; // add the view controllers view to the window [window addSubview:[vc view]]; // release vc (we're done with it) [vc release]; // make key and visible of course! [window makeKeyAndVisible]; // happy times return YES; }