source: orbit/iOS/Orbit/Orbit/AppDelegate.m @ 66477ef

RawEEGRaw_EEG_PlotServoTab_Interfacepyramid
Last change on this file since 66477ef was 66477ef, checked in by Jonathon Horsman <jonathon@…>, 7 years ago

Initial checkin of working iOS app

  • Property mode set to 100644
File size: 2.6 KB
Line 
1//
2//  AppDelegate.m
3//  Orbit
4//
5//  Created by Jonathon Horsman on 17/12/2012.
6//  Copyright (c) 2012 Jonathon Horsman. All rights reserved.
7//
8
9#import "AppDelegate.h"
10#import "TGAccessoryManager.h"
11#import "TGAccessoryDelegate.h"
12#import "ViewController.h"
13
14@implementation AppDelegate
15
16- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
17{
18    // Override point for customization after application launch.
19    [[TGAccessoryManager sharedTGAccessoryManager] setupManagerWithInterval:0.05];
20    [[TGAccessoryManager sharedTGAccessoryManager] setDelegate:(ViewController *)self.window.rootViewController];
21    return YES;
22}
23                                                       
24- (void)applicationWillResignActive:(UIApplication *)application
25{
26    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
27    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
28    ViewController *rootController = (ViewController *)self.window.rootViewController;
29    [rootController appClosed];
30}
31
32- (void)applicationDidEnterBackground:(UIApplication *)application
33{
34    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
35    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
36}
37
38- (void)applicationWillEnterForeground:(UIApplication *)application
39{
40    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
41}
42
43- (void)applicationDidBecomeActive:(UIApplication *)application
44{
45    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
46    ViewController *rootController = (ViewController *)self.window.rootViewController;
47    [rootController appForegrounded];
48}
49
50- (void)applicationWillTerminate:(UIApplication *)application
51{
52    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
53    [[TGAccessoryManager sharedTGAccessoryManager] teardownManager];
54}
55
56@end
Note: See TracBrowser for help on using the repository browser.