すべてのコード例を示すことなく、これを簡単に説明します。
これは、viewWillAppearが最初に表示されたときにのみ呼び出されるようになったことはありますか?
私はすべての私の見解でこの問題を抱えています。
例:アプリが起動すると、メインメニューであるStartViewが表示されます。(viewWillAppearが呼び出されます)次に、ナビゲーションコントローラーを表示する1つのボタンを押します(viewWillAppearが呼び出されます)。次に、メインメニューに戻り(呼び出されません)、同じナビゲーションコントローラーをもう一度押すと呼び出されません。
誰かが私をどこかに向けることができれば素晴らしいでしょう、私は今2日からこれを探しています...
また、さらにコードサンプルが必要な場合は、いくつか提供できます。
さらに読むために:
これが私のナビゲーションコントローラーの呼び方です。
PremierSoinsAppDelegate *AppDelegate = (PremierSoinsAppDelegate *)[[UIApplication sharedApplication] delegate];
UIView *newView = [AppDelegate.navigationController view];
[newView setFrame:CGRectMake(320.0f, 0.0f, 320.0f, 480.0f)];
[UIView beginAnimations:@"RootViewController" context:nil];
[UIView setAnimationDuration:0.3];
newView setFrame:CGRectMake(0.0f, 0.0f, 320.0f, 480.0f)];
UIView commitAnimations];
[AppDelegate.window addSubview:newView];
[AppDelegate.window makeKeyAndVisible];
そして、それが私のメニューを表示する方法です:
PremierSoinsAppDelegate *AppDelegate = (PremierSoinsAppDelegate *)[[UIApplication sharedApplication] delegate];
UIView *newView = [AppDelegate.startViewController view];
newView setFrame:CGRectMake(-320.0f, 0.0f, 320.0f, 480.0f)];
UIView beginAnimations:@"StartViewController" context:nil];
UIView setAnimationDuration:0.3];
newView setFrame:CGRectMake(0.0f, 0.0f, 320.0f, 480.0f)];
[UIView commitAnimations];
[AppDelegate.window addSubview:newView];
[AppDelegate.window makeKeyAndVisible];
どうもありがとう。