SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
AppDelegate Class Reference

#import <AppDelegate.h>

Inherits UIResponder, and <UIApplicationDelegate>.

Instance Methods

(void- dealloc [implementation]
 
(BOOL) - application:didFinishLaunchingWithOptions: [implementation]
 
(void- applicationWillResignActive: [implementation]
 
(void- applicationDidEnterBackground: [implementation]
 
(void- applicationWillEnterForeground: [implementation]
 
(void- applicationDidBecomeActive: [implementation]
 
(void- applicationWillTerminate: [implementation]
 

Properties

UIWindow * window
 
ViewControllerviewController
 

Detailed Description

Definition at line 20 of file AppDelegate.h.

Method Documentation

◆ application:didFinishLaunchingWithOptions:

- (BOOL) application: (UIApplication*)  application
didFinishLaunchingWithOptions: (NSDictionary*)  launchOptions 
implementation

Definition at line 1 of file AppDelegate.mm.

33  :(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
34 {
35  self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
36  // Override point for customization after application launch.
37  if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)
38  {
39  self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPhone" bundle:nil];
40  }
41  else
42  {
43  self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPad" bundle:nil];
44  }
45  self.window.rootViewController = self.viewController;
46  [self.window makeKeyAndVisible];
47  return YES;
48 }

◆ applicationDidBecomeActive:

- (void) applicationDidBecomeActive: (UIApplication*)  application
implementation

Definition at line 1 of file AppDelegate.mm.

88  :(UIApplication*)application
89 {
90  /*
91  Restart any tasks that were paused (or not yet started) while the application
92  was inactive. If the application was previously in the background,
93  optionally refresh the user interface.
94  */
95 
96  printf("applicationDidBecomeActive\n");
97 }

◆ applicationDidEnterBackground:

- (void) applicationDidEnterBackground: (UIApplication*)  application
implementation

Definition at line 1 of file AppDelegate.mm.

63  :(UIApplication*)application
64 {
65  /*
66  Use this method to release shared resources, save user data, invalidate timers,
67  and store enough application state information to restore your application to
68  its current state in case it is terminated later.
69  If your application supports background execution, this method is called instead
70  of applicationWillTerminate: when the user quits.
71  */
72 
73  printf("applicationDidEnterBackground\n");
74  slTerminate();
75  exit(0);
76 }
void slTerminate()

◆ applicationWillEnterForeground:

- (void) applicationWillEnterForeground: (UIApplication*)  application
implementation

Definition at line 1 of file AppDelegate.mm.

78  :(UIApplication*)application
79 {
80  /*
81  Called as part of the transition from the background to the inactive state;
82  here you can undo many of the changes made on entering the background.
83  */
84 
85  printf("applicationWillEnterForeground\n");
86 }

◆ applicationWillResignActive:

- (void) applicationWillResignActive: (UIApplication*)  application
implementation

Definition at line 1 of file AppDelegate.mm.

50  :(UIApplication*)application
51 {
52  /*
53  Sent when the application is about to move from active to inactive state.
54  This can occur for certain types of temporary interruptions (such as an
55  incoming phone call or SMS message) or when the user quits the application
56  and it begins the transition to the background state.
57  Use this method to pause ongoing tasks, disable timers, and throttle down
58  OpenGL ES frame rates. Games should use this method to pause the game.
59  */
60  printf("applicationWillResignActive\n");
61 }

◆ applicationWillTerminate:

- (void) applicationWillTerminate: (UIApplication*)  application
implementation

Definition at line 1 of file AppDelegate.mm.

99  :(UIApplication*)application
100 {
101  /*
102  Called when the application is about to terminate.
103  Save data if appropriate.
104  See also applicationDidEnterBackground:.
105  */
106 
107  printf("applicationWillTerminate\n");
108 }

◆ dealloc

- (void) dealloc
implementation

Definition at line 1 of file AppDelegate.mm.

27 {
28  //[_window release];
29  //[_viewController release];
30  // [super dealloc];
31 }

Property Documentation

◆ viewController

- (ViewController*) viewController
readwritenonatomicstrong

Definition at line 23 of file AppDelegate.h.

◆ window

- (UIWindow*) window
readwritenonatomicstrong

Definition at line 22 of file AppDelegate.h.


The documentation for this class was generated from the following files: