Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set Navbar hidden = false don't work

i have 2 ViewController

VC A and VC B

VC A => NavigationBar Hidden = true

VC B => NavigationBar Hidden = false

I make a segue from A => B, but the navgiationbar in VC B is not visible.

i have include the following swift code in vc b:

override func viewWillAppear(animated: Bool) {
    self.navigationController?.navigationBarHidden = false
}

Any ideas?

like image 926
Ghost108 Avatar asked Feb 12 '26 04:02

Ghost108


1 Answers

if you are using

self.navigationController?.navigationBar.hidden = true;

use this to show Bar

self.navigationController?.navigationBar.hidden = false;

not to use

self.navigationController?.navigationBarHidden = false;

please check that

like image 141
Alex Wang Avatar answered Feb 14 '26 18:02

Alex Wang