ios - 在两个 tabbarcontroller 之间进行 Segue

标签 ios ios7 uitabbarcontroller segue uistoryboardsegue

我们重新设计了我们的应用程序以使用 Tabbarcontroller 作为主视图。在一个实例中,我们需要显示一条包含足够数据的记录,它也被分解到一个 tabbarcontroller 中。之前我们做了我们的 segue,如下所示。我不确定需要更改什么才能在两个 tabbarcontrollers 之间进行 segue

SelectProvidersView *view = [[self storyboard] instantiateViewControllerWithIdentifier:@"careTeamView"];
view.careProviders = self.selectedPatient.careProviders;
[self.navigationController pushViewController:view animated:YES];

我猜这是因为我在选项卡 Controller 而不是导航 Controller 中,我只是不知道应该如何更改。

最佳答案

不要使用seguetabBarControllers之间切换。使用[(UITabBarController*)self.navigationController.topViewController setSelectedIndex:index];手动切换到你想要的viewController

关于ios - 在两个 tabbarcontroller 之间进行 Segue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20532747/

相关文章:

ios - Firebase 动态链接如何在应用程序安装后存活下来的理论是什么?

iOS 7(非越狱)Wi-Fi RSSI 值

iOS:以编程方式更改选项卡 - Storyboard

ios - 自定义 moreNavigationController 的 tableview 和类似的用户界面

ios - NSURLConnection发生无法解释的崩溃

java - 将文本数据存储在一个/多个文件中以使其可用于各种平台的最佳方法是什么?

ios - Twitter 和 Facebook 不会出现在 UIActivityViewController Swift 3.0 上

pdf-generation - 创建PDF iOS7

ios - 状态栏不隐藏 - iOS 7

ios - 无法将类型 'UITabBarController' 的值转换为 'ViewController'