nuclear@0: #import "app_delegate.h" nuclear@0: #import "viewctl.h" nuclear@0: nuclear@0: @implementation AppDelegate nuclear@0: nuclear@0: - (BOOL)application: (UIApplication*)app didFinishLaunchingWithOptions: (NSDictionary*)opt nuclear@0: { nuclear@0: /* Override point for customization after application launch. */ nuclear@0: self.window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; nuclear@0: self.window.backgroundColor = [UIColor whiteColor]; nuclear@0: [self.window makeKeyAndVisible]; nuclear@0: nuclear@0: ViewController *vctl = [[ViewController alloc] initWithNibName: nil bundle: nil]; nuclear@0: self.window.rootViewController = vctl; nuclear@0: nuclear@0: return YES; nuclear@0: } nuclear@0: nuclear@0: - (void)applicationWillResignActive: (UIApplication*)app nuclear@0: { nuclear@0: /* Sent when the application is about to move from active to inactive nuclear@0: * state. This can occur for certain types of temporary interruptions (such nuclear@0: * as an incoming phone call or SMS message) or when the user quits the nuclear@0: * application and it begins the transition to the background state. Use nuclear@0: * this method to pause ongoing tasks, disable timers, and throttle down nuclear@0: * OpenGL ES frame rates. Games should use this method to pause the game. nuclear@0: */ nuclear@0: } nuclear@0: nuclear@0: - (void)applicationDidEnterBackground: (UIApplication*)app nuclear@0: { nuclear@0: /* Use this method to release shared resources, save user data, invalidate nuclear@0: * timers, and store enough application state information to restore your nuclear@0: * application to its current state in case it is terminated later. If nuclear@0: * your application supports background execution, this method is called nuclear@0: * instead of applicationWillTerminate: when the user quits. nuclear@0: */ nuclear@0: } nuclear@0: nuclear@0: - (void)applicationWillEnterForeground: (UIApplication*)app nuclear@0: { nuclear@0: /* Called as part of the transition from the background to the inactive nuclear@0: * state; here you can undo many of the changes made on entering the nuclear@0: * background. nuclear@0: */ nuclear@0: } nuclear@0: nuclear@0: - (void)applicationDidBecomeActive: (UIApplication*)app nuclear@0: { nuclear@0: /* Restart any tasks that were paused (or not yet started) while the nuclear@0: * application was inactive. If the application was previously in the nuclear@0: * background, optionally refresh the user interface. nuclear@0: */ nuclear@0: } nuclear@0: nuclear@0: - (void)applicationWillTerminate: (UIApplication*)app nuclear@0: { nuclear@0: /* Called when the application is about to terminate. Save data if nuclear@0: * appropriate. See also applicationDidEnterBackground: . nuclear@0: */ nuclear@0: } nuclear@0: nuclear@0: @end