Alex Rivera | Logout

Application windows are expected to have a root view controller at the end of application launch warning

Asked 2012-07-17T03:56:26.467
9

I have been stuck with this warning for several hours now. I've looked around SO for answers, attempted all the ones I found and couldn't find the solution. Here's the run-down of the code I have, which Xcode generated by default.

This is in my AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    self.window.rootViewController = self.navigationController;
    [self.window makeKeyAndVisible];
    return YES;
}

I have this on main.m (according to this answer)

int main(int argc, char *argv[])
{
    @autoreleasepool {
        int retVal = UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
        return retVal;
    }
}

I also have all the connections in my MainWindow.xib connected correctly. So I'm at a loss right now. Anything that I could be missing? Thanks in advance!

Edit
Report

1 Answer

1

I have this message because I had in my RootViewController @property(weak, nonatomic) IBOutlet UIView* loadView; and viewDidLoad was called twice... Rename it to something else...

answered 2013-07-08T10:00:13.057

Your Answer