I have a login screen view and 5 tabs in the app.I want when I done with the LoginScreen and it should move to the Tabs views(5) .for this once Login Task is done,I have to remove the view and add the another view controller of the tab..how to do this...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
UINavigationController *nav=[[UINavigationController alloc]initWithRootViewController:self.viewController];
self.window.rootViewController = nav;
[self.window makeKeyAndVisible];
return YES;
}
like this way I moves to the login view...now how to remove after completion of login and move to the tab1,tab2,tab3,tab4,tab5
Initially you add your firstViewController
as subView to your addDelegate.window
, then on buttonClick
you can remove your navController
and add tabBarController
to appDelegate.window
Follow my answer for better result Link