Reputation: 2802
When I drag a Navigation Controller on to the storyboard I get the Navigation Controller and a Table View Controller. I do not want the table view, so I delete it, insert a regular view controller, change its class to e.g LoginView, right-click and drag: "Relationship Root View Controller" from the Navigation Controller on to the View Controller.
Now when I run the application I get
Application windows are expected to have a root view controller at the end of application launch
I do not want to fix this programatically, since last time I did this it worked out of the box (xcode 4.2, now I upgraded to 4.3). Also, when adding the Navigation Controller in 4.2 it came with a View Controller, not a Table View Controller.
Navigation Controller has "Is Initial View Controller" set.
Upvotes: 4
Views: 8394
Reputation: 3008
In Xcode 8:
Upvotes: 7
Reputation: 8372
Upvotes: 2
Reputation: 1163
The issue is in the AppDelegate.m : - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
Try to comment out everything except for the return of course. When making an empty application this code is inserted for you and interferes with the initial view controller check that you did with in the root view controller on your storyboard. Also within your projects target, make sure the info.plist shows your storyboard as the mainstoryboard. Then finally make sure you have your initial view controller checked within the storyboard view. Select the view controller then look at its attributes. Check that little box.
Upvotes: 0
Reputation: 733
It's an old post, but for the ones that are still having this problem.
this should work, for me it worked.
Upvotes: 4
Reputation: 2802
My solution was to start a new project with "Single View" instead of "Empty"
Upvotes: -1
Reputation: 1183
Try doing it the other way around.
-(void)loadView
and delete the method to avoid a black screen on startupHope it helps.
Upvotes: 8