0
|
1 //
|
|
2 // MySampleProjectAppDelegate.m
|
|
3 // MySampleProject
|
|
4 //
|
|
5 // Created by Eric Wing on 7/29/11.
|
|
6 // Copyright 2011 __MyCompanyName__. All rights reserved.
|
|
7 //
|
|
8
|
|
9 #import "MySampleProjectAppDelegate.h"
|
|
10 #import "MySampleProjectViewController.h"
|
|
11
|
|
12 @implementation MySampleProjectAppDelegate
|
|
13
|
|
14 @synthesize window;
|
|
15 @synthesize viewController;
|
|
16
|
|
17 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
18 {
|
|
19 self.window.rootViewController = self.viewController;
|
|
20 return YES;
|
|
21 }
|
|
22
|
|
23 - (void)applicationWillResignActive:(UIApplication *)application
|
|
24 {
|
|
25 [self.viewController stopAnimation];
|
|
26 }
|
|
27
|
|
28 - (void)applicationDidBecomeActive:(UIApplication *)application
|
|
29 {
|
|
30 [self.viewController startAnimation];
|
|
31 }
|
|
32
|
|
33 - (void)applicationWillTerminate:(UIApplication *)application
|
|
34 {
|
|
35 [self.viewController stopAnimation];
|
|
36 }
|
|
37
|
|
38 - (void)applicationDidEnterBackground:(UIApplication *)application
|
|
39 {
|
|
40 // Handle any background procedures not related to animation here.
|
|
41 }
|
|
42
|
|
43 - (void)applicationWillEnterForeground:(UIApplication *)application
|
|
44 {
|
|
45 // Handle any foreground procedures not related to animation here.
|
|
46 }
|
|
47
|
|
48 - (void)dealloc
|
|
49 {
|
|
50 [viewController release];
|
|
51 [window release];
|
|
52
|
|
53 [super dealloc];
|
|
54 }
|
|
55
|
|
56 @end
|