标签:
//进入到某一个viewController里
[self.navigationController pushViewController:viewController animated:YES];
//返回到到某一个viewController里
[self.navigationController popViewController:viewController animated:YES];
//返回到到跟视图里
[self.navigationController popToRootViewControllerAnimated:YES];
/** 这里是使用索引来返回到某一页 */ (该视图在当前的页的前两页)
BankCardViewController *addBankCardViewController = [self.navigationController.viewControllers objectAtIndex:self.navigationController.viewControllers.count - 3];
[self.navigationController popToViewController:addBankCardViewController animated:YES];
/** 这里使用了遍历数组返回到某一页 */
for (id obj in self.navigationController.viewControllers) {
if ([obj isKindOfClass:[BankCardViewController class]]) {
[self.navigationController popToViewController:obj animated:YES];
}
}
标签:
原文地址:http://www.cnblogs.com/hahsimin/p/4974696.html