Description: parameters of the application, within which a chart is created.
#import <UIKit/UIKit.h> @class ViewController; @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic, retain) UIWindow *window; @property (strong, nonatomic) ViewController *viewController; @end
#import "AppDelegate.h" #import "ViewController.h" @implementation AppDelegate @synthesize window=_window; - (void)dealloc { [_window release]; [super dealloc]; } - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; self.viewController = [[[ViewController alloc] init] autorelease]; [_viewController release]; self.window.rootViewController = self.viewController; [self.window makeKeyAndVisible]; return YES; } - (void)applicationWillResignActive:(UIApplication *)application { /* Called if application is about to change its state from active to inactive. This may occur at specific types of time breaks (for example, incoming call or SMS), or if a user leaves the application, and it turns to background mode. Use this method to pause current tasks, disable timers, and so on */ } - (void)applicationDidEnterBackground:(UIApplication *)application { /* Use this method to free common resources, save user data, reset timers and save information about application state that is sufficient for its further restore. If your application supports background execution, this method is called instead of applicationWillTerminate:, when a user stops work. */ } - (void)applicationWillEnterForeground:(UIApplication *)application { /* Called as part of moving from inactive to active state; this method can be used to cancel many changes executed on moving to background mode. */ } - (void)applicationDidBecomeActive:(UIApplication *)application { /* Restart all the paused tasks (or not started tasks) while the application was inactive. If the application was in the background mode, user interface refresh is available. */ } - (void)applicationWillTerminate:(UIApplication *)application { /* Called when the application is about to close. Save data if required. See also: applicationDidEnterBackground:. */ } @end
See also: