tags:

views:

24

answers:

3

hi,

any-body tried a scenario like, a login screen to show for the first time and after validation of username the application starts with uitabbar controller.

i tried with the application with uitabbar only. with the login screen put as first-view in tabbar controller, with "TabBarController.tabBar.hidden=TRUE;" but the view is getting distorted (the space for tabbar is still empty) and here some one can help me in getting the view properly displayed?

thanks, abhayadev s

A: 

Have the login page in the firstview controller.Add the tabbar to the window only after navigating to the second view controller.Thats it.

All the best.

Warrior
+1  A: 

another possibility is to show the login viewController as a modal viewController. Modal VC hide the tabbar.

fluchtpunkt
+1  A: 

Create another viewController (e.g. LoginViewController). In your AppDelegate in applicationDidFinishLaunching: add (isLogged is just for exemple):

if (self.isLogged) {
   [window addSubview:self.tabBarViewController.view];
} else {
   LoginViewController *loginVC = [[LoginViewController alloc] initWithNibName:@"login" bundle:nil];
   [window addSubview:loginVC.view];
}

And you should call a method when login is successful that removes loginVC view and add tabBarController.view on the window.

It's no more complicated than that.

F.Santoni