Just trying to wrap my head around how different project types are built and I must be missing something.
I’m trying to start with a window based application and just add a Navigation Controller so I understand how the different components work with the Window and App delegate.
Here’s what I did:
- Created a Window based project
- In my app delegate.h I added
@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
In my app delegate.m I added:
@synthesize navigationController;
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
self.window.rootViewController = self.navigationController;
[self.window makeKeyAndVisible];
return YES;
}
- In the MainWindow.xib file I added a NavigationController below the
Window - Created a new UIViewController subclass (FirstView.h/m)
- Pointed the NavigationController’s root view controller to FirstView
Builds clean, when I launch I get an all white screen.
What am I missing?
Figured it out – I had to create a new Referencing outlet and connect the Navigation Controller to the App Delegate in the .xib.