0
votes

I'm new to iOS and trying to build one AR app with navigation bar, I defined 3 viewcontroller in the app, and using storyboard and navigation bar to switch the viewcontrollers:

VC1 - Home view, there is one button navigated to VC2;

VC2 - this view controller will call camera to scan image marker; when the image was identified, I just instantiate VC3 programmatically.

VC3 - just showing some information for the image, I added 2 buttons here which will navigated to VC1 and VC2 seperately.

So VC1->VC2, VC2->VC1 are OK as the navigation bar configuration, the problem is when I click button in VC3 to VC1 or VC2, both navigation bar in VC1 and VC2 disappear. It seems I missed some configuration here, can anyone tell me how to make the navitation bar always there?

2

2 Answers

0
votes

You can check navigationBar's visibility in method viewDidAppear of VC1 and VC2 like this:

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    NSLog(@"navigationBar is hidden:%@\n",  
    self.navigationController.navigationBar.hidden ? @"YES": @"NO");
}

It should be YES in VC1 and VC2, you probably change navigationBar's visibility in somewhere, find it then fix it.

0
votes

I have solved my problem from below link, it is working perfectly

Change destination of Navigation Back button