diff Classes/MySampleProjectAppDelegate.m @ 0:5ec52341f221

Initial commit
author Eric Wing <ewing@anscamobile.com>
date Fri, 29 Jul 2011 18:18:15 -0700
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Classes/MySampleProjectAppDelegate.m	Fri Jul 29 18:18:15 2011 -0700
@@ -0,0 +1,56 @@
+//
+//  MySampleProjectAppDelegate.m
+//  MySampleProject
+//
+//  Created by Eric Wing on 7/29/11.
+//  Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import "MySampleProjectAppDelegate.h"
+#import "MySampleProjectViewController.h"
+
+@implementation MySampleProjectAppDelegate
+
+@synthesize window;
+@synthesize viewController;
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+    self.window.rootViewController = self.viewController;
+    return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+    [self.viewController stopAnimation];
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+    [self.viewController startAnimation];
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+    [self.viewController stopAnimation];
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+    // Handle any background procedures not related to animation here.
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+    // Handle any foreground procedures not related to animation here.
+}
+
+- (void)dealloc
+{
+    [viewController release];
+    [window release];
+    
+    [super dealloc];
+}
+
+@end