I am trying to access the initial viewcontroller of my storyboard. It is a navigation controller which is wired up to a second viewcontroller via a seque. So after application did finish launching i want to directly show viewController that is connected through the segue. I tried it out with code like this but it doesnt work ...
UINavigationController *navController = (UINavigationController*)self.window.rootViewController;
[navController.topViewController performSegueWithIdentifier:@"showLoginScreen" sender:self];
Be sure you have tick marked the
is initial ViewController
UINavigationController in storyBoard
UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; UINavigationController * myStoryBoardInitialViewController = [storyboard instantiateInitialViewController];