美文网首页
ios开发navigationController pushVi

ios开发navigationController pushVi

作者: 陌上北辰 | 来源:发表于2016-09-18 17:47 被阅读136次

    返回指定的某个vc用下面(通过index定位)

    [self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:2] animated:YES];

    或(通过class定位)

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

    if ([controller isKindOfClass:[你要跳转到的Controller class]]) {

    [self.navigationController popToViewController:controller animated:YES];

    }

    }

    相关文章

      网友评论

          本文标题:ios开发navigationController pushVi

          本文链接:https://www.haomeiwen.com/subject/cwlgettx.html