1、、//关闭当前页面,跳转下一页面
NSMutableArray * array =[[NSMutableArray alloc]initWithArray:self.navigationController.viewControllers];
//删除当前页面
[array removeObjectAtIndex:array.count-1];
HomeViewController *vc = [[HomeViewController alloc]initWithNibName:@"HomeViewController" bundle:nil];
//添加要跳转的controller
[array addObject:vc];
[self.navigationController setViewControllers:array animated:YES];
2、、、//退出跳至某页面
for (UIViewController *controller in self.navigationController.viewControllers) {
if ([controller isKindOfClass:[LoginViewController class]]) {
[self.navigationController popToViewController:controller animated:YES];
}
}