Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (34 sloc) 1.59 KB
#import "BasicApp.h"
#import "Debug.h"
@implementation BasicAppDelegate
- (void) applicationDidFinishLaunching: (UIApplication *) application {
//debug(@"hello world!"); // for later use
// Note that mainScreen is a class method that returns the device's screen and is
// provided by the platform by default.
// Create the window and set it's size to maximum.ne
mainWindow = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
// Determine the max size allowed for the view. This is based off of the application
// size. This should be something like the max size minue the status bar up top.
mainView = [[UIView alloc] initWithFrame: [[UIScreen mainScreen] applicationFrame]];
// Add the view to our window and set the color of the view. The color change is
// only necessary to visually confirm our code works.
[mainWindow addSubview:mainView];
[mainView setBackgroundColor: [UIColor lightGrayColor]];
// for future use. implementation of a navigation controller.
//UIViewController *rootController = [[UIViewController alloc] init];
//UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController: rootController];
//[rootController release];
//[mainWindow addSubview: navigationController.view];
//[navigationController setToolbarHidden: NO];
// Display the window and make it the "key" window. The "key" window is the one that
// will receive user input.
[mainWindow makeKeyAndVisible];
}
- (void) applicationWillTerminate;
{
[mainWindow release];
}
- (UIWindow *) getMainWindow {
return mainWindow;
}
@end