I have encountered a strange behavior on the back button of a navigation bar. I will try my best to describe with with screenshots(through links, as I cant not upload yet)
Here is the first screen, or the parent view with the navigation bar hidden: Screen 1
Here is the code for first screen:
override func viewDidLoad() {
super.viewDidLoad()
self.navigationController?.navigationBarHidden = false
// Do any additional setup after loading the view.
}
override func viewWillAppear(animated: Bool) {
self.navigationController?.navigationBarHidden = false
}
This is my code for pushing the view controller:
var second = self.storyboard?.instantiateViewControllerWithIdentifier("As_ThirdViewControllerID") as! As_ThirdViewController!
self.navigationController?.pushViewController(second, animated: true)
When you click the last tab bar button, it will bring you to a second screen: Screen 2
Same code as first screen, only, the navigation bar is NOT hidden
Now, in that second screen, you can see a BUTTON...when you click the button you will be brought to the third and last screen: Screen 3
Same code as first screen, only, the navigation bar is NOT hidden
THE STRANGE BEHAVIOR: When I swipe going back(third screen -> second -> parent) -- ITS WORKING.. When I press back button from the THIRD and last screen --> it looks like this: Screen 4 -- NOT WORKING, not going back to the previous screen...the word "back" suddenly goes away from the arrow
I don't have a lot of codes in my classes as of now as I am just starting and formulating the design, so I could not figure out what's wrong with my program..