Como alterar o RootViewController (no AppDelegate) no CustomViewController?
Dia bom
Meu aplicativo possui o formulário de autorização (SigninController) carregado no AppDelegate e após o login (a verificação está em SigninController.m) O TabBarController deve aparecer (como visualização principal do aplicativo
Como posso mudar o controlador de Signin para TabBar e onde
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
SigninController *aSigninController = [[SigninController alloc] initWithNibName:@"SigninView" bundle:nil];
self.currentController = aSigninController;
[aSigninController release];
self.window.rootViewController = self.currentController;
[self.window makeKeyAndVisible];
return YES;
}
SigninController.m
- (IBAction)signinClick
{
........
if (loginOK == YES)
{
//This place is ready to send messages to show TabBar
} else {
UIAlertView *alert = ......
[alert show];
[alert release];
}
}