1. Create a nav in Appdelegate as the main nav:
// . h **Login_nav; // . M = = = Self.login_nav;
2. Create the tab controller in the Login interface and add each sub Nav:
HomeController *home_ctr =[[HomeController alloc] Init];home_ctr.title=@"Home Page"; Uinavigationcontroller*home_nav =[[Uinavigationcontroller alloc] initwithrootviewcontroller:home_ctr];D evicecontroller*DEVICE_CTR =[[Devicecontroller alloc] init];d evice_ctr.title=@"Device List"; Uinavigationcontroller*device_nav =[[Uinavigationcontroller alloc] initwithrootviewcontroller:device_ctr]; Uitabbarcontroller*ROOTTABBARCTR =[[Uitabbarcontroller alloc] init]; Nsarray*nav_views =@[home_nav,device_nav]; [Roottabbarctr Setviewcontrollers:nav_views]; [Self.navigationcontroller pushviewcontroller:roottabbarctr Animated:yes];
3. call when you need to return to the top-level Login interface :
Appdelegate *app = (appdelegate *) [[uiapplication delegate];[ App.login_nav Poptorootviewcontrolleranimated:yes];
Login Logoff schema under multi-level navigation bar