【问题标题】:Segue between two tabbarcontrollers两个标签栏控制器之间的转场
【发布时间】:2013-12-12 00:27:41
【问题描述】:

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

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

我猜这是因为我在标签控制器而不是导航控制器中,我只是不知道应该如何更改。

【问题讨论】:

    标签: ios ios7 uitabbarcontroller segue uistoryboardsegue


    【解决方案1】:

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

    【讨论】:

    • 这会将我所有的标签换成新标签?我还能使用后退按钮功能吗?
    • 你还需要使用上面的函数切换回来
    猜你喜欢
    • 2011-12-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-01
    • 2013-11-10
    • 2012-03-07
    相关资源
    最近更新 更多