2010-12-20 20 views
0

私は最初にログインする必要のあるアプリケーションを開発しています。それは実際にはtabBarアプリケーションであり、ローダーはdidFinishLaunchingWithOptions:(NSDictionary *)launchOptionsメソッドでその上にログインビューを持っています。これは私がやったこと:他のビューでタスクが終了するのを待つ

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {  
    [[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO]; 
    // Override point for customization after application launch. 
    authView = [[AuthViewController alloc] init]; 
    // Add the tab bar controller's view to the window and display. 
    [window addSubview:tabBarController.view]; 
    [UIView beginAnimations:@"curldown" context:nil]; 
    [UIView setAnimationDelegate:self]; 
    [UIView setAnimationDuration:1]; 
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:authView.view cache:YES]; 
    [window addSubview:authView.view]; 
    [UIView commitAnimations]; 
    [window makeKeyAndVisible]; 
    return YES; 

    [authView release]; 
} 

私がしたいのは、このログインビューが削除されるまで待機する最初のコントローラです。詳細については、これはどのように私はauthViewControllerでauthViewを削除:

[UIView beginAnimations:@"curlup" context:nil]; 
     [UIView setAnimationDelegate:self]; 
     [UIView setAnimationDuration:1]; 
     [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view.superview cache:YES];   
     [self.view removeFromSuperview]; 
     [UIView commitAnimations]; 

答えて

4

使用NSNotification

すべて最高です。

+0

こんにちは、NSNotificationを使用してどのように達成できますか?私は自分自身を試しましたが、成功することはできませんでした:( –

+0

それを並べ替え、ありがとう。:) –

0

デリゲート階層を設定しようとしましたか?あなたが実際に必要とするのは、異なるコントローラ間の通信なので、参考になるかもしれません。

関連する問題