【问题标题】:Tabbarcontroller behaviour - iOSTabbarcontroller 行为 - iOS
【发布时间】:2012-08-08 09:14:52
【问题描述】:

我正在尝试从 newViewController 按钮到达 IBAction 上的选项卡栏 C。但是当我到达时,标签栏控制器显示 A 的视图而不是 C 的视图。如果使用

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];

UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"MyInitialViewController"];
[vc presentModalViewController:navController animated:NO]; 

我最终创建了没有标签栏选项和导航栏的 C 标签栏视图

任何帮助将不胜感激!谢谢

【问题讨论】:

    标签: ios xcode uitabbarcontroller ibaction


    【解决方案1】:

    如果你使用storyboards并且想要保留导航栏和标签栏,你应该使用

    [self.navigationController performSegueWithIdentifier:@"MyInitialViewController" sender:self];
    

    而不是使用模态表示

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-16
      • 1970-01-01
      • 2021-05-20
      • 2012-03-01
      • 2011-02-19
      • 2018-07-01
      相关资源
      最近更新 更多