Setting title of UINavigationBar

后端 未结 3 1453
刺人心
刺人心 2021-01-13 11:19

I have an application which uses a main story board to include a Navigation Controller where the main view is a Table View using a prototype cell content. Each cell in the

相关标签:
3条回答
  • 2021-01-13 11:35

    If you have a tab bar controller, try this:

    self.tabBarController.navigationItem.title = @"Title";
    
    0 讨论(0)
  • 2021-01-13 11:46

    it is the right way. it will work.

    0 讨论(0)
  • 2021-01-13 11:52

    I'm doing something similar in an app I'm working on. Here's how I'm setting the title:

    [[self navigationItem] setTitle:@"My View's Title"];
    

    I thinkt the dot notation equivalent would be something like this:

    self.navigationItem.title = @"My View's Title";
    

    Hope that helps.

    0 讨论(0)
提交回复
热议问题