【发布时间】:2019-05-23 22:28:53
【问题描述】:
我的根导航有一个StoreDetailsController,我在StoreDetailsController中呈现给ShoppingBagNavigationController。它们可以无限呈现。想回到根导航怎么办?
- (void)goBagVC{
UINavigationController *shoppingBag = [[UIStoryboard storyboardWithName:@"ShoppingBag" bundle:nil] instantiateViewControllerWithIdentifier:@"ShoppingBagNavigationController"];
ShoppingBagViewController *myshopVC = shoppingBag.viewControllers[0];
[myshopVC passDetailProduct:self.productDetailModel.productID];
[self presentViewController:shoppingBag animated:YES completion:nil];}
- (void)goRootVC{
[self.navigationController.tabBarController setSelectedIndex:0];
[self.navigationController popToRootViewControllerAnimated:YES];}
我想在 goRootVC 函数中进入根控制器。谢谢
【问题讨论】:
标签: ios objective-c uinavigationcontroller