为嵌入的UITabBar子视图设置不同的UINavigationController标题?

在我的应用程序中,我在UINavigationController中嵌入了一个UITabBarController。 问题是UINavigationController将该标签栏视为单个视图控制器,即使其中有4个选项卡。 我需要为导航栏标题中显示的这4个选项卡中的每一个选择不同的标题标题。 在这4个视图的子类上使用self.title什么也不做。 它只是在导航栏中不断显示相同的标题,因为就像我所说的那样,UINavigationController将整个标签栏控制器视为单个视图。

我如何为标签栏控制器中的每个视图都有单独的标题?



尝试在每个选项卡的视图控制器内使用[self.navigationItem setTitle:] 。 如果这不起作用,请尝试更深一点, [self.tabBarController.navigationItem setTitle:]

链接地址: http://www.djcxy.com/p/54969.html

上一篇: Set different UINavigationController titles for embedded UITabBar subviews?

下一篇: Container controllers and iOS 6 rotations