Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pnyinyi

macrumors newbie
Original poster
Mar 8, 2012
1
0
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
 

anedwar

Contributor
Feb 10, 2012
33
3
North Carolina
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.