pushViewController多次跳转返回到最上层方法
作者:
Fisher123 | 来源:发表于
2017-12-29 22:38 被阅读12次//pushViewController 多次跳转返回到最上层方法 返回根页面vc用 :
[self.navigationController popToRootViewController animated:YES];
//返回指定的某个vc用下面(通过index定位)
[self.navigationController popToViewController: [self.navigationController.viewControllers objectAtIndex:2] animated:YES];
//或(通过class定位)
for (UIViewController *controller in self.navigationController.viewControllers) {
if ([controller isKindOfClass:[你要跳转到的Controller class]]) {
[self.navigationController popToViewController:controller animated:YES]; }
}
本文标题:pushViewController多次跳转返回到最上层方法
本文链接:https://www.haomeiwen.com/subject/xxgwgxtx.html
网友评论