Xcode 4.3 and empty application template

Discussion in 'iPhone/iPad Programming' started by pnyinyi, Mar 8, 2012.

  1. macrumors newbie

    Joined:
    Mar 8, 2012
    #1
    I used empty application template to create a project on Xcode 4.3. I used empty application template because I wanted to use core data. I created the storyboard and added it to the project. When I ran it, it says rootviewcontroller is required. I am using the navigationcontroller. I tried to set rootviewcontroller to self.navigationController in app delegate class, but I can't. Thanks in advance for the solutions.

    Paw
     
  2. macrumors newbie

    Joined:
    Feb 10, 2012
    Location:
    North Carolina
    #2
    Couple things to try

    1. make sure you set the Main storyboard for your target to the storyboard you created.

    2. In your AppDelegate.m file

    remove the following lines from the
    - (BOOL)application: (UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions

    Code:
    self.window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];

    Just tested this on a quick project and it got rid of the error message you were seeing
     

Share This Page