UINavigationController 跳转到指定 页面

1280阅读 0评论2015-12-07 jeffasdasd
分类:iOS平台

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


for (UIViewController *temp in self.navigationController.viewControllers) {
           if ([temp isKindOfClass:[你要跳转到的Controller class]]) {
              [self.navigationController popToViewController:temp animated:YES];
           }
       }

UIStoryboard *board = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
                                                    FeedListViewController *vc = [board instantiateViewControllerWithIdentifier:@"FeedListViewController"];
                                                    for (UIViewController *temp in self.navigationController.viewControllers) {
                                                        if ([temp isKindOfClass:[vc class]]) {
                                                            [self.navigationController popToViewController:temp animated:YES];
                                                        }
                                                    }
上一篇:iOS UITabBarController 典型应用
下一篇:iPhone实战:动态改变UITableView中的Cell高度