再会,
我的应用程序具有在 AppDelegate 中加载的授权表单(SigninController),登录后(检查在 SigninController.m 中)TabBarController 应该出现(作为应用程序的主视图)。
如何将控制器从登录更改为 TabBar 以及在哪里?
- (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;
}
登录控制器.m
- (IBAction)signinClick
{
........
if (loginOK == YES)
{
//This place is ready to send messages to show TabBar
} else {
UIAlertView *alert = ......
[alert show];
[alert release];
}
}