zoukankan      html  css  js  c++  java
  • IOS之NavigationController跳转到指点的界面

    在之前用的presentViewcontroller用的比较多,但是解除了NavigationController之后看了下里面的方法,也有过看过里面的方法呀,

    比如返回上一级的界面:[self.navigationController popViewControllerAnimated:YES];

    返回的主界面的:[self.navigationController popToRootViewControllerAnimated:YES];

    跳转到指定的界面:

    NewConfigViewController *homeVC = [[NewConfigViewController alloc] init];

        UIViewController *target = nil;

        for (UIViewController * controller in self.navigationController.viewControllers) { //遍历

            if ([controller isKindOfClass:[homeVC class]]) { //这里判断是否为你想要跳转的页面

                target = controller;

            }

        }

        if (target) { 

            [self.navigationController popToViewController:target animated:YES]; //跳转

        }

  • 相关阅读:
    Servlet CDI Example Analysis
    JSON续
    JSON
    Ubuntu 下安装 MySQL
    Filter介绍
    Annotation相关
    Container、Injection
    Java buildTools
    Http协议
    URI URL URN 的区别
  • 原文地址:https://www.cnblogs.com/zhufeng1994/p/5486346.html
Copyright © 2011-2022 走看看