2

I've started to code my first app and got first challenge. I need menu logic as on the picture below:

enter image description here

So, what is correct way to realize it?

  1. Main menu should be separate View Controller with Segue to Navigation Controller?

or

  1. Navigation controller is initial controller for the app and main menu is a root view for navigation controller? I've tried to do like this but I don't have an idea how to hide top bar from main menu (I don't need it on main menu view)?

Thanks for help.

kelvinelove
  • 550
  • 7
  • 19

1 Answers1

0

Case 2. You should make navigation controller an initial controller of the app, and main menu should be a root view controller of the navigation controller.

To hide navigation bar use setNavigationBarHidden(_:animated:)

One of the option is to place this hide/show functionality in viewWillAppear/viewWillDisappear methods of menu view controller as described here iPhone hide Navigation Bar only on first page

In case 1 you will have to implement yourself back functionality and back-forward animation which will require a lot of code.

Community
  • 1
  • 1
Avt
  • 16,927
  • 4
  • 52
  • 72