istereo2
annotate src/ios/app_delegate.m @ 18:25d821ab1ca2
fixed ios bugs
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 01 Oct 2015 08:36:55 +0300 |
parents | |
children |
rev | line source |
---|---|
nuclear@0 | 1 #import "app_delegate.h" |
nuclear@0 | 2 #import "viewctl.h" |
nuclear@0 | 3 |
nuclear@0 | 4 @implementation AppDelegate |
nuclear@0 | 5 |
nuclear@0 | 6 - (BOOL)application: (UIApplication*)app didFinishLaunchingWithOptions: (NSDictionary*)opt |
nuclear@0 | 7 { |
nuclear@0 | 8 /* Override point for customization after application launch. */ |
nuclear@0 | 9 self.window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; |
nuclear@0 | 10 self.window.backgroundColor = [UIColor whiteColor]; |
nuclear@0 | 11 [self.window makeKeyAndVisible]; |
nuclear@0 | 12 |
nuclear@0 | 13 ViewController *vctl = [[ViewController alloc] initWithNibName: nil bundle: nil]; |
nuclear@0 | 14 self.window.rootViewController = vctl; |
nuclear@0 | 15 |
nuclear@0 | 16 return YES; |
nuclear@0 | 17 } |
nuclear@0 | 18 |
nuclear@0 | 19 - (void)applicationWillResignActive: (UIApplication*)app |
nuclear@0 | 20 { |
nuclear@0 | 21 /* Sent when the application is about to move from active to inactive |
nuclear@0 | 22 * state. This can occur for certain types of temporary interruptions (such |
nuclear@0 | 23 * as an incoming phone call or SMS message) or when the user quits the |
nuclear@0 | 24 * application and it begins the transition to the background state. Use |
nuclear@0 | 25 * this method to pause ongoing tasks, disable timers, and throttle down |
nuclear@0 | 26 * OpenGL ES frame rates. Games should use this method to pause the game. |
nuclear@0 | 27 */ |
nuclear@0 | 28 } |
nuclear@0 | 29 |
nuclear@0 | 30 - (void)applicationDidEnterBackground: (UIApplication*)app |
nuclear@0 | 31 { |
nuclear@0 | 32 /* Use this method to release shared resources, save user data, invalidate |
nuclear@0 | 33 * timers, and store enough application state information to restore your |
nuclear@0 | 34 * application to its current state in case it is terminated later. If |
nuclear@0 | 35 * your application supports background execution, this method is called |
nuclear@0 | 36 * instead of applicationWillTerminate: when the user quits. |
nuclear@0 | 37 */ |
nuclear@0 | 38 } |
nuclear@0 | 39 |
nuclear@0 | 40 - (void)applicationWillEnterForeground: (UIApplication*)app |
nuclear@0 | 41 { |
nuclear@0 | 42 /* Called as part of the transition from the background to the inactive |
nuclear@0 | 43 * state; here you can undo many of the changes made on entering the |
nuclear@0 | 44 * background. |
nuclear@0 | 45 */ |
nuclear@0 | 46 } |
nuclear@0 | 47 |
nuclear@0 | 48 - (void)applicationDidBecomeActive: (UIApplication*)app |
nuclear@0 | 49 { |
nuclear@0 | 50 /* Restart any tasks that were paused (or not yet started) while the |
nuclear@0 | 51 * application was inactive. If the application was previously in the |
nuclear@0 | 52 * background, optionally refresh the user interface. |
nuclear@0 | 53 */ |
nuclear@0 | 54 } |
nuclear@0 | 55 |
nuclear@0 | 56 - (void)applicationWillTerminate: (UIApplication*)app |
nuclear@0 | 57 { |
nuclear@0 | 58 /* Called when the application is about to terminate. Save data if |
nuclear@0 | 59 * appropriate. See also applicationDidEnterBackground: . |
nuclear@0 | 60 */ |
nuclear@0 | 61 } |
nuclear@0 | 62 |
nuclear@0 | 63 @end |