首页 > 移动平台 > 详细

IOS之NavigationController跳转到指点的界面

时间:2016-05-13 10:43:38      阅读:216      评论:0      收藏:0      [点我收藏+]

在之前用的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]; //跳转

    }

 

IOS之NavigationController跳转到指点的界面

原文:http://www.cnblogs.com/zhufeng1994/p/5486346.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!