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];
}
}