おはよう、CustomViewController内から(AppDelegateの)RootViewControllerを変更するにはどうすればいいですか?
私のアプリは、AppDelegateで読み込まれたサインインした後(SigninController.mにチェックが入っています)、TabBarControllerが(アプリケーションのメインビューとして)表示されます。
コントローラをSigninから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;
}
SigninController.m
- (IBAction)signinClick
{
........
if (loginOK == YES)
{
//This place is ready to send messages to show TabBar
} else {
UIAlertView *alert = ......
[alert show];
[alert release];
}
}
使用しているプログラミング言語にタグを付けてください。 –