@ Protocol UIApplicationDelegate <NSObject>
@ Optional
-(Void) applicationDidFinishLaunching :( UIApplication *) application; // called after the program is loaded
-(BOOL) application :( UIApplication *) application didfinishlaunchingwitexceptions :( NSDictionary *) launchOptions _ OSX_AVAILABLE_STARTING (_ MAC_NA ,__ IPHONE_3_0 );
// This method is called when the program is loaded and there may be additional startup options. We recommend that you use this method to initialize the application.
-(Void) applicationDidBecomeActive :( UIApplication *) application; // called when the application is activated
-(Void) applicationWillResignActive :( UIApplication *) application; // The application is called when it is switched to the background (inactive) state.
-(BOOL) application :( UIApplication *) application handleOpenURL :( NSURL *) url; // Will be deprecated at some point, please replace with application: openURL: sourceApplication: annotation: // request a delegate to open a URL Resource
-(BOOL) application :( UIApplication *) application openURL :( NSURL *) url sourceApplication :( NSString *) sourceApplication annotation :( id) annotation _ OSX_AVAILABLE_STARTING (_ MAC_NA ,__ IPHONE_4_2 ); // no equiv. notification. return NO if the application can't open for some reason // request to delegate to open a URL Resource
-(Void) applicationDidReceiveMemoryWarning :( UIApplication *) application; // try to clean up as much memory as possible. next step is to terminate app // call when the memory is low
-(Void) applicationWillTerminate :( UIApplication *) application; // when the program is about to exit, it is called and usually used to save data and clean up before exiting. You need to set the key value of UIApplicationExitsOnSuspend.
-(Void) applicationSignificantTimeChange :( UIApplication *) application; // midnight, carrier time update, daylight savings time change // executed when the system time changes
-(Void) application :( UIApplication *) application willChangeStatusBarOrientation :( UIInterfaceOrientation) newStatusBarOrientation duration :( NSTimeInterval) duration; // execute when the direction of the StatusBar box is about to change
-(Void) application :( UIApplication *) application didChangeStatusBarOrientation :( UIInterfaceOrientation) oldStatusBarOrientation; // executed when the StatusBar box direction changes
-(Void) application :( UIApplication *) application willChangeStatusBarFrame :( CGRect) newStatusBarFrame; // in screen coordinates // when the StatusBar box direction is about to change
-(Void) application :( UIApplication *) application didChangeStatusBarFrame :( CGRect) oldStatusBarFrame; // executed when the StatusBar box direction changes
// One of these will be called after calling-registerForRemoteNotifications
-(Void) application :( UIApplication *) application didregisterforremotenotifswswithdevicetoken :( NSData *) deviceToken _ OSX_AVAILABLE_STARTING (_ MAC_NA ,__ IPHONE_3_0 ); // when an application successfully registers a push Service (APS) and sends it to the Delegate
-(Void) application :( UIApplication *) application didFailToRegisterForRemoteNotificationsWithError :( NSError *) error _ OSX_AVAILABLE_STARTING (_ MAC_NA ,__ IPHONE_3_0 ); // execute when an application registers a push Service (APS) and fails to be sent to the Delegate
-(Void) application :( UIApplication *) application didReceiveRemoteNotification :( NSDictionary *) userInfo _ OSX_AVAILABLE_STARTING (_ MAC_NA ,__ IPHONE_3_0 ); // when a running application receives a remote notification and sends it to the delegate...
-(Void) application :( UIApplication *) application didReceiveLocalNotification :( UILocalNotification *) notification _ OSX_AVAILABLE_STARTING (_ MAC_NA ,__ IPHONE_4_0 ); // executed when a running program receives a local notification
-(Void) applicationDidEnterBackground :( UIApplication *) application _ OSX_AVAILABLE_STARTING (_ MAC_NA ,__ IPHONE_4_0); // call it when the program is pushed to the background. So to set the background to continue running, you can set it in this function.
-(Void) applicationWillEnterForeground :( UIApplication *) application _ OSX_AVAILABLE_STARTING (_ MAC_NA ,__ IPHONE_4_0); // It is called when the program is about to return to the foreground from the background, this is just the opposite of the above method.
-(Void) applicationProtectedDataWillBecomeUnavailable :( UIApplication *) application _ OSX_AVAILABLE_STARTING (_ MAC_NA ,__ IPHONE_4_0); // notification delegate, protected files are currently unavailable
-(Void) applicationProtectedDataDidBecomeAvailable :( UIApplication *) application _ OSX_AVAILABLE_STARTING (_ MAC_NA ,__ IPHONE_4_0); // notification delegate, protected files are currently available