-2

I am developing UINavigationController based application. I placed the title to separate the pages. If I move to the first page , I set the title

self.navigationItem.title=@"First"; 

If I move to the second page

self.navigationItem.title=@"Second";  

and it is working fine. But as I move to the third page, I'm setting the title yet it shows < Second Third

Anyone knows how to check if the UINavigationController title is present or not.

Tomasz Stanczak
  • 12,796
  • 1
  • 30
  • 32
NewbieiOS
  • 81
  • 1
  • 1
  • 11

4 Answers4

1

on your Third ViewController add the following code in ViewDidLoad and try once

[self.navigationItem.backBarButtonItem setTitle:@" "];
Anbu.Karthik
  • 82,064
  • 23
  • 174
  • 143
0

in your ThirdViewController use the following code in ViewDidLoad

[self.navigationItem.backBarButtonItem setTitle:@""];

it works for you

Abhi
  • 243
  • 4
  • 19
0

plz use this code

when you are move second tho third

in second view controller

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    self.navigationItem.backBarButtonItem=[[UIBarButtonItem alloc] initWithTitle:@" "
                                                                       style:UIBarButtonItemStylePlain
                                                                      target:nil action:nil];
}
balkaran singh
  • 2,754
  • 1
  • 17
  • 32
0

it is working.... Thank you everyone..

- (void)viewWillDisappear:(BOOL)animated
{
    self.title = @"Back";
}

- (void)viewWillAppear:(BOOL)animated
{
    self.title = @"Title of your navigation bar";
}
NewbieiOS
  • 81
  • 1
  • 1
  • 11