【问题标题】:TabBar is not visible on navigating into another UIViewControllerTabBar 在导航到另一个 UIViewController 时不可见
【发布时间】:2018-06-21 09:31:09
【问题描述】:

我正在从 TabBarController 导航到另一个 UIViewController

aViewController.title = @"Product Name";
[self.tabBarController.navigationController pushViewController:aViewController animated:YES];

从标签栏导航后不可见。

所以改代码

[self.navigationController pushViewController:aViewController animated:YES];

TabBar 可见,但 按钮不可见。

从标签栏导航后如何有标签栏和默认的后退按钮?

【问题讨论】:

  • [self.navigationController pushViewController:aViewController animated:YES]; 实际上是这样做的正确方法。你能检查一下后退按钮所在的区域是否可以点击吗?或者您可能正在代码中的某处将返回按钮设置为零。
  • [self.navigationController pushViewController:aViewController animated:YES]; 实际上是这样做的正确方法。你能检查一下后退按钮所在的区域是否可以点击吗?或者您可能正在代码中的某处将返回按钮设置为零。
  • 正如@UmairAamir 正确指出的那样,您必须从您的navigationController 中推送,而不是从Tabviewcontoller 的navigationVC 中推送

标签: ios uinavigationcontroller uitabbarcontroller tabbar


【解决方案1】:

我刚刚为此问题创建了一个测试项目,您会看到它按预期工作。 https://github.com/Pei116/TabTest-iOS

【讨论】:

    猜你喜欢
    • 2015-07-17
    • 2018-06-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-18
    相关资源
    最近更新 更多