I have an issue after clicking on the back button.
I have a first view embedded in a NavigationController with an imageView. The navigation bar is customized with this following code:
override func viewDidLoad() {
super.viewDidLoad()
// color the navigation bar and text
self.navigationController?.navigationBar.barTintColor = UIColor(red: 0, green: 0.24, blue: 0.45, alpha: 1)
self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName : UIColor.whiteColor()]
When user taps on the imageView, the following code is executed:
self.performSegueWithIdentifier("view2", sender: self)
It is a show(push)
segue.
When user taps on Back button
in view2, it returns to first view but the navigation bar has disappeared!
I think it is masked by something because I can see it during debug by clicking on Debug View Hierarchy
.
Last point, if I replace the imageView tap action to go to view2 by a simple bar button and perform the segue in storyboard and not in the code, the issue does not appear.
Any idea to fix it?