rootViewController set in Storyboard not showing on App Launch
Asked Answered
A

3

16

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)?

Adrell answered 24/11, 2011 at 16:26 Comment(3)
I'm also newbie in this area, but first thing that pop up to my mind, don't you have to do it in on viewdidload on your MasterControllerView?, I started from the template they offer and changing accordingly to my needs (still not getting what I want). As I said I just started and we have very similar problems :)Coreycorf
Did you set your storyboard as "main storyboard" in the project settings on the "Summary" tab?Allopatric
@Adrell thanks for the update (just some days off to relax, and back to work) I'll have a look! And also keep you posted with any update.Coreycorf
A
4

I searched and searched, and finally found my answer(@jms - hope this answers yours as well). See here: Xcode 4.2 iOS Empty Application and storyboards.

Adrell answered 21/6, 2012 at 17:58 Comment(0)
I
29

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;
}
Immoderate answered 9/12, 2011 at 6:12 Comment(0)
A
4

I searched and searched, and finally found my answer(@jms - hope this answers yours as well). See here: Xcode 4.2 iOS Empty Application and storyboards.

Adrell answered 21/6, 2012 at 17:58 Comment(0)
V
1

I had the same problem, just select both of them CMD+X to cut, then CMD+V to paste it will set one as root view :)

View answered 7/3, 2014 at 19:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.