1

self.title = @"title";

self.navigationController.title = @"title";

self.navigationItem.title = @"title";

self.navigationController.NavigationItem.title = @"title";

Nothing changes the Title. What can I do?

DoHi7
  • 21
  • 7
  • If "self" is a UIViewController presented by an UINavigationController, then "self.navigationItem.title = @"title";" should set the title in the navigation bar to "title". – Reinhard Männer Nov 10 '14 at 19:33

2 Answers2

1

this is how I made it in the MainTabBarController, but I can't change it for example in the SettingsViewController.

- (void)viewDidLoad {
    [super viewDidLoad];
    UINavigationBar *navbar = [[UINavigationBar alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 60)];

    UINavigationItem *navItem = [UINavigationItem alloc];
    navItem.title = @"Test";
    navbar.translucent = NO;

    [navbar pushNavigationItem:navItem animated:false];
    [self.view addSubview:navbar];

}
DoHi7
  • 21
  • 7
0

My Solution was to make in every ViewController it's own NavigationBar and hide the NavitagionBart from the MainTabController.

DoHi7
  • 21
  • 7