I tried have an application with UTabBarController in storyboard.
It displayed fine. however, I would like also to show firstTimViewController if user launch app for first time. hence, I need to show this view on didFinishLaunchingWithOptions in Appdelgate.
I’ve used below code:
UIStoryboard *storyboard = window.rootViewController.self.storyboard;
StartupViewController *svc = [storyboard instantiateViewControllerWithIdentifier:@"StartupTableIdentifier"];
[self.window.rootViewController presentModalViewController:svc animated:NO];
it gives me the following error:
Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘Application tried to present a nil modal view controller on target .’
Have you set up the storyboard for the app? The name of the storyboard should match. Click on the project, click on the target, and verify in the summary tab that the Main Scoreboard name matches the name of the .storyboard in the project.
To make sure you have an inital view controller, make sure inital view controller is checked: