Ivan
Ivan

Reputation: 191

Why I can't see Top bar, after navigationcontroller go back programmatically

I have navigation controller with rootViewController and childViewController. When I start my app I see Top Bar on my rootViewController. Then I go to childViewController trough segue and than try to return to rootViewController

 @IBAction func exitButtonAction(sender: AnyObject) {
         navigationController?.popToRootViewControllerAnimated(true)
    }

but it is start without Top Bar. I go back programmatically, because on my childViewController Top Bar is hidden. How can I fix it?

Upvotes: 0

Views: 51

Answers (1)

Jacolack
Jacolack

Reputation: 1508

This is a boolean value that can solve what you need: self.navigationController?.navigationBarHidden = true

Set it to true or false when you need to.

Upvotes: 1

Related Questions