iOS-navigationController跳转指定控制器

2017-10-12 14:48:17来源:oschina作者:gwl_人点击

分享

[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:2] animated:YES];

for (UIViewController *controller in self.navigationController.viewControllers) {if ([controller isKindOfClass:[你要跳转到的Controller class]]) {

[self.navigationController popToViewController:controller animated:YES];
}
}

[self.navigationController popToViewController:[self.navigationController.viewControllersobjectAtIndex: ([self.navigationController.viewControllerscount] -6)] animated:NO];

微信扫一扫

第七城市微信公众平台