iOS 在修改导航栏标题的同时不改变tabbar的标题

第一种方法:
UILabel *titleText = [[UILabel alloc] initWithFrame: CGRectMake(0, 0, 320, 44)];
titleText.backgroundColor = [UIColor clearColor];
titleText.textColor=[UIColor whiteColor];
titleText.textAlignment = NSTextAlignmentCenter;
[titleText setFont:[UIFont systemFontOfSize:17.0]];
[titleText setText:@”我是导航栏标题”];
self.navigationItem.titleView=titleText;
第二种方法:
[self.navigationItem setTitle:@”我是导航栏标题”];

你可能感兴趣的:(开发中遇到的问题)