我希望能够在不影响标签栏标题的情况下更改页面标题。我目前的实施如下:
//Setting page and UITabbar title in app delegate
ForYouViewController *fuvc = [[ForYouViewController alloc]init];
fuvc.title = @"Questions";
UITabBarItem *tempTabBarItem1 = [[UITabBarItem alloc]initWithTitle:@"Questions" image:nil tag:QUESTIONTAB_INDEX];
点击问题标签之前
//After changing the title's page in view did load of "ForYouViewController"
- (void)viewDidLoad
{
[super viewDidLoad];
self.title = @"Latest";
}
点击问题标签(标签栏标题已更改)
如何设置页面标题,使其不会改变标签栏的描述?
答案 0 :(得分:0)
你可以试试这个
YourAppDelegate *appDelegate = (YourAppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate tempTabBarItem1] setTitle:@"Questions"];