Change
int retVal = UIApplicationMain(argc, argv, nil, nil);
in main.m in
int retVal = UIApplicationMain(argc, argv, nil, @"MyAppDelegate");
Then you should initialize the window in AppDelegate:
CGRect screenBounds = [[UIScreen mainScreen] bounds]; self.window = [[[UIWindow alloc] initWithFrame: screenBounds] autorelease];
Then you can add views to the window.
source share