iOS Navigationcontroller jump to the Pointing interface

Source: Internet
Author: User

In the previous use of the presentviewcontroller used more, but lifted the navigationcontroller after looking at the inside of the method, there has been seen inside the method Ah,

For example, return to the previous level of the interface:[self. Navigationcontroller popviewcontrolleranimated:YES];

return to the main interface: [self. Navigationcontroller poptorootviewcontrolleranimated:YES];

Jump to the specified interface:

Newconfigviewcontroller *HOMEVC = [[newconfigviewcontroller alloc] init];

uiviewcontroller *target = nil;

for (uiviewcontroller * Controller in self. Navigationcontroller. Viewcontrollers) { // traversal

if ([Controller iskindofclass: [Homevc class]]) { // here to determine if the page you want to jump to

target = controller;

}

}

if (target) {

[self. Navigationcontroller poptoviewcontroller: Target animated:YES]; // jump

}

iOS Navigationcontroller jump to the Pointing interface

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.