0

I read probably the whole internet and I couldn’t find the solution, maybe I don’t know proper name of this feature. Normally navigation bar is visible on each VC and each new view in app comes from the right side of device. Suddenly the navigation bar in my app became invisible and new views started coming from the bottom of the device. How to come back to the previous settings? Actually I don’t know which function caused this change and where I can change it back.

Thank You for help.

1 Answers1

1

I think the supposed problem is, that you started to present modally your controllers instead of push

if you are pushing controller, like

self.navigationController?.pushViewController(viewController, animated: true)

than your navigationBar is shown. if you are presenting modally, like

self.presentViewController(vc, animated: true, completion: nil)

it appears from down, and has no navigationController. Check please What's the difference between all the Selection Segues?

and I offer you to read documentation about iOS navigation and basic things before asking questions

Pavel Zagorskyy
  • 443
  • 1
  • 4
  • 20
  • Thank You for the answer. I didn’t know that problem might be connected to segues, because I built my app on default segues settings and didn’t make any change. I used only show segues and one root (between navigation controller and root view controller), so checking segues didn’t solve my problem. It seems like the app ignores my navigation controller. Anyway thanks for trying to help. – Martyna Wiśnik Jul 26 '18 at 07:29
  • @MartynaWiśnik in this case check `initial view controller` on storyboard. it should be - your navigation controller, with root view controller, not just uiviewcontrolelr – Pavel Zagorskyy Jul 26 '18 at 14:11