rootViewController set in Storyboard not showing on App Launch

tarheel picture tarheel · Nov 24, 2011 · Viewed 18k times · Source

I started with an Empty Application and added the storyboard file myself, added a View Controller to the storyboard and then embedded it into the Navigation Controller. Now, when I launch the app in iOS Simulator - nothing shows. Screenshot of my storyboard is below.

What needs to happen to get the "AddPerson" to show on launch?

enter image description here

Update: Yes, Main Storyboard is set, but the Main Interface is blank. Should that Main Interface be set to something(the drop down is blank)?

Answer

user346749 picture user346749 · Dec 9, 2011

Just comment out all your generated code in app delegate's - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method except for return YES.

Here's my code and it worked fine.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    //self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    //self.window.backgroundColor = [UIColor whiteColor];
    // [self.window makeKeyAndVisible];
    return YES;
}