Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set root view controller

Tags:

People also ask

How do I change the root view controller in storyboard?

1) Remove Storyboards from app. plist file, 2) Uncheck option "isInitialViewController" from Storyboards which is checked in case of Tab Bar controller because its a root ViewController , 3) Add this code in appDelegate. m file.

How do I get navigation controller root view controller?

The root view controller is simply the view controller that sits at the bottom of the navigation stack. You can access the navigation controller's array of view controllers through its viewControllers property. To access the root view controller, we ask for the first item of the array of view controllers.


I set up an empty app with only an app delegate class, then subclassed a view controller class to create a xib to layout the app and make connections.

But when I tried to run the app on iOS Simulator, I got an error which read: CoinToss[6212:f803] Applications are expected to have a root view controller at the end of application launch Terminating in response to SpringBoard's termination. Program ended with exit code: 0

What do I need to do in order to create a root view controller for the app?

Thank you.