To create a root navigation controller without a tip:
In the App Delegate application, you will see the following:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. // Add the navigation controller view to the window and display. self.window.rootViewController = self.navigationController; [self.window makeKeyAndVisible]; return YES; }
self.navigationController refers to the navigation controller that was loaded from MainWindow.xib (the name of this file is specified in the Info.plist application file, see below).
Open MainWindow.xib and turn off the navigationController property of your application delegate, and then remove the Navigation Controller (not Window) object in the Objects panel.
Remove the IBOutlet property from the navigationController @property declaration in the application delegate header file (since it will no longer be associated with the nib file).
Replace the code in the Application Delegate application with the following:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { RootViewController *rootViewController = [[[RootViewController alloc] initWithNibName:nil bundle:nil] autorelease]; self.navigationController = [[[UINavigationController alloc] initWithRootViewController:rootViewController] autorelease]; self.window.rootViewController = self.navigationController; [self.window makeKeyAndVisible]; return YES; }
To create a main window without a tip:
You probably don't need to do this (and I do not recommend it), but since you (kind of) asked a question ...
Delete MainWindow.xib.
In main.m, replace the last argument with UIApplicationMain with the name of your App Delegate (without extension). For instance:
int retVal = UIApplicationMain(argc, argv, nil, @"TestProjectAppDelegate");
Open the Info.plist file and delete the following two lines:
<key>NSMainNibFile</key> <string>MainWindow</string>
Remove the IBOutlet property from the window @property declaration in the App Delegate header file.
Create a window in the application deletion:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];