1

我已经设法使用以下代码将“更多”标题和字体/颜色更改为 appdelegate.m:

label.textColor = [UIColor whiteColor];
label.font = [UIFont systemFontOfSize:18];
self.tabBarController.moreNavigationController.navigationBar.topItem.titleView = label;
label.text = self.tabBarController.moreNavigationController.navigationBar.topItem.title;
[label release];

但是,一旦我进入其中一个选项卡表单,更多的 tableview 标题就会变回粗体黑色文本,而后退按钮是蓝色文本。

任何想法如何更改这些标签?我试过了:

    self.tabBarController.moreNavigationController.navigationBar.topItem.backBarButtonItem.title = @"test 1";
    self.tabBarController.moreNavigationController.navigationBar.backItem.backBarButtonItem.title = @"test 2";

但两者都不会影响后退按钮的标题,所以我猜这不是正确的项目。

谢谢!

4

1 回答 1

0

试试这种方式来改变后退按钮的标题

UIBarButtonItem *btnBack = [[UIBarButtonItem alloc]
                        initWithTitle:@"test 1"
                        style:UIBarButtonItemStyleBordered
                        target:self
                        action:nil];
self.navigationController.navigationBar.topItem.backBarButtonItem=btnBack;
于 2013-10-22T10:37:01.690 回答