Possible Duplicate:
show a login screen before Tab bar controller?
i am designing an iphone application which should be display login screen initially, after that it should display tab bar controller with 5 tabs. Am able to launch login screen initially, but after that am unble to show tab bar controller, kindly help me out with the source code guys. here is my code: this is a view based application
application.M
-(void)applicationDidFinishLaunching:(UIApplication *)application {
// Override point for customization after app launch
[window addSubview:viewController.view];
[window addSubview:tabBarController. view];
[window makeKeyAndVisible];
LoginView *loginView=[[LoginView alloc]initWithNibName:@"LoginView" bundle:nil];
[window addSubview:loginView.view];
}
view controller.M
- (void)viewDidLoad
{ LoginView *loginView=[[LoginView alloc]initWithNibName:@"LoginView" bundle:nil];
[self.view addSubview:loginView.view];
[super viewDidLoad];
}
where i am doing wrong, am unable to show tab bat controller after login screen. when the application is launched i can see tab bar controler at the bottom of the login screen initially. how to avoid that????? help me with code and also after clicking on login button, how to dismiss loginview and how to load tab bar controller???