Dominik
Dominik

Reputation: 419

swift Navigation Bar doesnt appear

i have a problem i never had before. Normally i'm creating a

Navigation Controller --> BottomBarNavigationController --> Controller --> Detail Controller logic. The result is that i see a navigation bar at the top. Right now its shown in the editor but not at the emulator.

Here is my Storyboard:

And here is the resutl at the emulator: Screenshot

Here is the code i'm pushing to detail viewcontroller:

        self.performSegue(withIdentifier: "showChat", sender: self)

Upvotes: 0

Views: 66

Answers (1)

Keshu R.
Keshu R.

Reputation: 5215

If your current View controller is showing the navigation bar but the next controller is not, then these could be the possible cases:

  1. You are presenting the controller instead of pushing it to navigation stack.
  2. If you are using segue, you might have selected Segue kind as "Present Modally" instead of "Show"
  3. Your current view controller viewWillDisapper function says navigationController?.navigationBar.isHidden = true which hides the navigation bar as soon as the current view disappears.
  4. Your destination view controller is hiding the navigation bar somewhere in code.
  5. Your CurrentViewController is not embedded in a NavigationController.

Upvotes: 1

Related Questions