I'm designing an app intended to have the following navigation structure: I need to have a welcome view with "Sign up" and "Sign in" buttons as most of apps have:
This view does not show any navigation bar, as it seems to be the common thing. If "Sign In" tapped, then the login view will be presented modally:
And if "Sign up" tapped, the welcome view navigates to a form requesting user input to create an account:
Then, once the user logs in and enters the app, I'd want it to have side menus similar to Facebook, YouTube or Spotify:
Being the central panel a UINavigationController
. Left side panel I think it usually is an 'UIViewController'...
The point is, I don´t know what the rootViewController
of my app should be, and what hierarchy of view controllers should I have. I've thought about a couple of possibilities:
1) Being the rootViewController
an UINavigationController
, push the welcome view hidding the navigation bar (is that possible?), presenting the "Sign In" view if needed or pushing the "Sign Up" view. Once the user has logged in, pop these views from the rootViewController
, that is a UINavigationController
, and then push in such navigation controller the custom view controller managing the side menu stuff.
2) Being the rootViewController
the side menu custom view controller, and setting as its central panel an UINavigationController
. Push there the welcome view and so on, without setting any view controller for the left/right panels, and then when user has logged in, pop those views from the central panel's UINavigationController
, push there the corresponding view, and now setting the left/right panels
I hope I've explained myself. Maybe there is another and better approach to handle this scenario. Does somebody implemented an app like this? I need help with this issue, and also I'll appreciate being recommended a custom library/control providing the side menu stuff from someone who has used one and it is easy to use and customize. I know there are lots of them (MMDrawerController, JASidePanels, for example), but I'd like to have some opinions from people that had developed an app with one of them.
Note: I need to support iPad as well, and iOS 5+
Thanks a lot
I would recommend you to have two main ViewControllers, one for login/signup and second one for the main content with side menu. After the user will log in, just change the window rootViewController to the second one.
For the side menu you can use:
I've design an app using ECSlidingViewController (created by Michael Enriquez) which works very fine for me and easy to use.
Tutorial also available on youtube : http://www.youtube.com/watch?v=tJJMyzdB9uI
As for Swift, you could use InteractiveSideMenu library as Side Menu. It's quite easy to implement and transition animation looks pretty smooth. It was a good find for my project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With