I am doing this and want to open Tab bar Controller from Login Page if its first time and if already login then pass the LoginPage and open Tab Bar Controller after Spalsh>
You don't need a splash screen controller unless you are animating something. This example uses NSUserDefaults to remember if it's first login or not.
In you application delegate put the following:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
if(![[NSUserDefaults standardUserDefaults] dictionaryForKey:@"someKey"]){
UIViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"registerViewController"];
self.window.rootViewController = viewController;
} else {
UIViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"mainViewController"];
self.window.rootViewController = viewController;
}
[self.window makeKeyAndVisible];
return YES;
}
If you decide you must have a viewcontroller for the splash screen then you can put the same code there.