我们重新设计了我们的应用程序以使用 Tabbarcontroller 作为主视图。在一个实例中,我们需要显示一条包含足够数据的记录,它也被分解到一个 tabbarcontroller 中。之前我们做了我们的 segue,如下所示。我不确定需要更改什么才能在两个 tabbarcontrollers 之间进行 segue
SelectProvidersView *view = [[self storyboard] instantiateViewControllerWithIdentifier:@"careTeamView"];
view.careProviders = self.selectedPatient.careProviders;
[self.navigationController pushViewController:view animated:YES];
我猜这是因为我在选项卡 Controller 而不是导航 Controller 中,我只是不知道应该如何更改。
最佳答案
不要使用segue
在tabBarControllers
之间切换。使用[(UITabBarController*)self.navigationController.topViewController setSelectedIndex:index];
手动切换到你想要的viewController
关于ios - 在两个 tabbarcontroller 之间进行 Segue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20532747/