2012-04-17 6 views
-2

appDelegateでは、A_NavigationControllerを作成してself.window.rootViewControllerにし、X_ViewControllerをrootViewControllerに設定します。他のviewControllerをプッシュした後、新しいB_NavigationControllerを作成し、新しいY_ViewControllerを設定します。 rootViewControllerになり、presentModalViewControllerメソッドを使用し、B_NavigationeControllerを追加しました。今私がしたいのは、Y_ViewControllerを却下したときに、A_NavigationControllerのrootViewControllerを変更することができます。navigationControllerのrootViewControllerを変更するには

+0

2日前にそれを尋ねました:http://stackoverflow.com/questions/10154765/change-the-rootviewcontroller – iNoob

+0

Try popToViewController – WhiteTiger

答えて

0

「rootViewController」は、navigationStackの下部にあるUIViewControllerだけです。それを変更するには、インデックス0のオブジェクトを任意のコントローラに設定することができます

関連する問題