Root view controller error question


When running Hypnosister, I get the following warning in the debugger console:

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

Is there a most likely cause for this warning? … or two … or three.

At one point, I was able to disarm the warning, but as I worked on the code further it returned.

Thanks! :stuck_out_tongue:


It looks like you don’t have a View Controller; you are using the view directly.

When you start using the View Controllers, you will have something similar to the following in your code:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    self.viewController = [[ViewController alloc] initWithNibName:nil bundle:nil];
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    return YES;

And the warning will go away.


Thank you. Investigating based on your suggestion, I realized that I had failed to include one of the delegates in the @interface.

I appreciate your taking time to point me in the right direction.