0

I have two UIViewController A and B.

ViewController A is embedded in a UINavigationController hence automatically inheriting a UINavigationBar.

While segueing from ViewController B which is not embedded to A the UINavigationBar disappears.

  1. Why is this happening?
  2. How can i segue to A without embedding B to the UINavigationController?
Kuldeep
  • 4,466
  • 8
  • 32
  • 59
Paul Kahohi
  • 164
  • 1
  • 3
  • 6
  • you can add navigation bar manually from controllers tray – Devil Decoder Apr 13 '18 at 12:03
  • Then i would have to add manual bars for every ViewController embedded to that specific navigation controller. In a case where i have many viewControllers embedded it can be tedious. Is there another way... – Paul Kahohi Apr 13 '18 at 12:05
  • you might be messing navigationBar in controller B. Better put `navigationController?.setNavigationBarHidden(false, animated: true)` in Controller A's `viewWillAppear` and check if it returns back. – Kamran Apr 13 '18 at 12:06
  • You'd have to use a modal segue, and you should wire that segue to the NavigationController and not to A. – vacawama Apr 13 '18 at 12:09
  • Does not work @Kamran – Paul Kahohi Apr 13 '18 at 12:12

0 Answers0