Find all the current view controllers in the navigation controller

Source: Internet
Author: User

stack: Only one mouthful , advanced out ;push into the stack ; pop out Stack ;

//    queue: There are two ports , FIFO first;

// navigation controller : container ; Implement the jump between the View controller interface ;

Uinavigationcontroller * nav = [[uinavigationcontroller alloc] Initwithrootviewcontroller: FIRSTVC];

//// When you put a view controller into the navigation controller, the properties of the View controller Navigationcontroller will be assigned values to record nav; Firstvc.navigationcontroller can find navigation; Firstvc.navigationcontroller = nav;

// navigation bar : One navigation controller with only one navigation bar ;

//Nav.navigationBar.hidden = YES;

Locate this view controller in the navigation controller ; Note: You cannot create a new one because it is not the one that was originally created in the navigation controller ;

nsarray * viewcontrollers = self. Navigationcontroller. Viewcontrollers ;

Uiviewcontroller * VC = viewcontrollers[1];

[self. Navigationcontroller POPTOVIEWCONTROLLER:VC Animated:YES];

Poptoviewcontroller:animated: out of the stack until the specified view controller stack is at the top; the return value is An array of view controllers that are out of the stack ;

Find all the current view controllers in the navigation controller

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.