Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navigation bar Hidden not working IOS

Hi I'm new in iOS development. I've one main screen with navigation bar hidden true. From there I am navigating to another view using back segue. but when I click back it showing navigation bar on main screen. Here is my problem description.

In main screen onviewload I am doing :

self.navigationController.navigationBarHidden = YES;

once user go to another view using back segue in new controller, I'm doing

self.navigationController.navigationBarHidden = NO;

And now, if I click back it will show navigation bar on main window also which I don't want. Basically I want main screen without navigation bar and next window with navigation bar.

How to do this. Need Help. Thank you.

like image 686
nilkash Avatar asked Apr 15 '14 05:04

nilkash


1 Answers

Put that code in viewWillAppear instead of viewDidLoad, and it should work properly.

like image 85
rdelmar Avatar answered Nov 15 '22 03:11

rdelmar