2

I have FormViewController that I made full programmatically with Eureka form builder (link). I dont have view controller in storyboard for that. Class name of that view controller is NewPasswordVC. When I click od add bar button I open NewPasswordVC with this code:

let newPasswordVC = NewPasswordVC()
self.navigationController?.pushViewController(newPasswordVC, animated: true)

I open NewPasswordVC but when I go back in root view controller my bottom toolbar disappear. Why? How to fix this?

This is storyboard: enter image description here

This is my problem in gif: enter image description here

Hrvoje
  • 696
  • 7
  • 22

2 Answers2

0

Can't speak about Eureka specifically, but chances are the UIViewController being pushed in has hidesBottomBarWhenPushed set to true.

So I would look into setting it to false, which can be done programmatically.

  • It does not work. The toolbar is hidden when I enter a new VC, where I can write a code that will be executed when I snap back on the navigation? – Hrvoje Nov 15 '18 at 07:03
0

The solution to my problem I found here: link

override func willMove(toParent parent: UIViewController?){
    super.willMove(toParent: parent)
    if parent == nil{
        self.navigationController?.isToolbarHidden = false
    }
}
Hrvoje
  • 696
  • 7
  • 22