Changeset 66477ef in orbit for iOS/Orbit/Orbit/AppDelegate.m


Ignore:
Timestamp:
12/19/12 13:43:13 (9 years ago)
Author:
Jonathon Horsman <jonathon@…>
Branches:
master, RawEEG, Raw_EEG_Plot, Servo, Tab_Interface, pyramid
Children:
4010dcc
Parents:
d604d68
Message:

Initial checkin of working iOS app

File:
1 edited

Legend:

Unmodified
Added
Removed
  • iOS/Orbit/Orbit/AppDelegate.m

    rdccf843 r66477ef  
    33//  Orbit 
    44// 
    5 //  Created by Steve Castellotti on 12/2/12. 
    6 //  Copyright (c) 2012 Puzzlebox. All rights reserved. 
     5//  Created by Jonathon Horsman on 17/12/2012. 
     6//  Copyright (c) 2012 Jonathon Horsman. All rights reserved. 
    77// 
    88 
    99#import "AppDelegate.h" 
     10#import "TGAccessoryManager.h" 
     11#import "TGAccessoryDelegate.h" 
     12#import "ViewController.h" 
    1013 
    1114@implementation AppDelegate 
     
    1417{ 
    1518    // Override point for customization after application launch. 
     19    [[TGAccessoryManager sharedTGAccessoryManager] setupManagerWithInterval:0.05]; 
     20    [[TGAccessoryManager sharedTGAccessoryManager] setDelegate:(ViewController *)self.window.rootViewController]; 
    1621    return YES; 
    1722} 
     
    2126    // 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. 
    2227    // 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]; 
    2330} 
    2431 
     
    3744{ 
    3845    // 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]; 
    3948} 
    4049 
     
    4251{ 
    4352    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 
     53    [[TGAccessoryManager sharedTGAccessoryManager] teardownManager]; 
    4454} 
    4555 
Note: See TracChangeset for help on using the changeset viewer.