I checked the various answers here and could not find one which works. I have a regular TabBarController based application. I want to show a login screen at launch. What I did was
Subclassed UITabBarController and implemented the following in the viewDidAppear:
LoginViewController *controller = (LoginViewController *)[[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"LoginVC"]; [self presentViewController:controller animated:YES completion:nil];
Once this runs there are 2 things happening : 1. The login view never shows up 2. The log has this : Warning: Attempt to present on whose view is not in the window hierarchy!
What am I missing?