Description: parameters of the application where a map is created.
@class ViewController; @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; // Application window @property (strong, nonatomic) ViewController *viewController; // View manager @end
#import "AppDelegate.h"
#import "ViewController.h"
@implementation AppDelegate
@synthesize window = _window;
@synthesize viewController = _viewController;
- (void)dealloc
{
[_window release];
[_viewController release];
[super dealloc];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Create an application window
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Create a view manager
self.viewController = [[ViewController alloc] autorelease];
// Display application window together with map
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
// Fill application window background with white color
self.window.backgroundColor = [UIColor whiteColor];
return YES;
}
@end
See also: