Login Logout schema under multi-level navigation bar

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.