0
在我的應用程序中,我顯示了一個用於登錄的ViewController。一旦用戶成功登錄,我想從NavigationController歷史記錄中完全刪除它並加載用戶帳戶視圖控制器。如何在使用TTNavigator時替換rootViewController
可以這樣使用Three20庫TTNavigator模塊
在我的應用程序中,我顯示了一個用於登錄的ViewController。一旦用戶成功登錄,我想從NavigationController歷史記錄中完全刪除它並加載用戶帳戶視圖控制器。如何在使用TTNavigator時替換rootViewController
可以這樣使用Three20庫TTNavigator模塊
是的,這很容易做到。
首先,初始化你的主要rootView(例如tabBar)。然後最重要的是登錄
[navigator openURLAction:[TTURLAction actionWithURLPath:@"pr://tabBar"]];
// now show the login page!
[navigator openURLAction:[TTURLAction actionWithURLPath:@"pr://accounts"]];
[navigator.window makeKeyAndVisible];
現在如果您完成登錄,只需從堆棧中刪除視圖。