JVS JVS - 11 months ago 58
Swift Question

Back Bar Button Segue hides Toolbar

I am using a

segue in my application.
Whenever I segue to another screen and press the back bar button, my

I tried to get rid of it with

navigationController?.toolbar.hidden = false

in my
It doesn't work though. Any ideas?


Please add the code in the viewWillAppear() and it should solve the problem you are facing.

 override func viewWillAppear(animated: Bool) {
    navigationController?.toolbarHidden = false


Remember that viewDidLoad() fires only once during the life cycle of a view controller and in your case , it is in the navigation stack which means it has been already used for that view controller and now when you press back button, it does not work again.