本文介绍了self.tabBarItem.title不工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的iPhone应用程序中,我有一个标签栏。此选项卡栏包含UINavigationController。我有:

In my iPhone application, I have a tab bar. This tab bar holds a UINavigationController. I have:


  • 在Interface Builder中将标签项标题设置为新建

  • In UINavigation控制器我有 self.tabBarItem.title ='Create New'; self.title ='Create New';

  • 在推入控制器的UIViewController中:self.tabBarItem.title ='Create New';但 self.title ='Blah';

  • In Interface Builder set the tab item title to 'Create New'
  • In the UINavigation controller I have self.tabBarItem.title = 'Create New'; and self.title = 'Create New';
  • In the UIViewController pushed onto the controller: self.tabBarItem.title = 'Create New'; but self.title = 'Blah';.

但是,总是如此显示推入导航控制器的第一个视图控制器的self.title(Blah)。你如何设置标签栏项目的标题?谢谢,
Isaac Waller

But, always, the self.title of the first view controller pushed onto the navigation controller is shown (Blah). How would you set the title of the tab bar item? Thanks,Isaac Waller

推荐答案

我发现如果我使用 self.navigationItem.title = 'Blah'; 而不是 self.title ,它会起作用。

I found if I used self.navigationItem.title = 'Blah'; instead of self.title, it would work.

这篇关于self.tabBarItem.title不工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 08:50