目标:当我触摸“ fourthViewController”按钮内部时,它将检查是否在不使用“ objectAtIndex:x”的情况下将“ secondViewController”放置在viewController堆栈中。如果存在,它将弹出视图控制器,直到secondViewController在顶部。
当前结果:
2014-03-11 10:44:54.187 Test_Push[320:11303] (
"<HomeViewController: 0x7153bd0>",
"<secondViewController: 0x71636c0>",
"<thirdViewController: 0x71648e0>",
"<fourthViewController: 0x7128b60>"
)
试试这个,
for (UIViewController *viewcontroller in [self.navigationController viewControllers]) {
if ([viewcontroller isKindOfClass: [secondViewController class]]){
[self.navigationController popToViewController:viewcontroller animated:YES];
}
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句