Search code examples
iosobjective-csidebarxcode-storyboard

Implementing a slide-out menu bar after a login screen in xcode


I have been following the appcoda tutorial (http://www.appcoda.com/ios-programming-sidebar-navigation-menu/) on how to implement a slide-out menu bar for my app using SWRevealViewController. I am wanting to show the slide out menu after the user has logged in.

My root view is the login page. I created a reveal view controller like the tutorial, and put it after the login page. However, when I get to my root view, it displays a back button instead of my slide out bar. In the console, I am getting errors such as "Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted." and "nested push animation can result in corrupted navigation bar".

I have attached an image of my storyboard. Would I need to implement another navigation controlller in the storyboard? enter image description here


Solution

  • When you navigate from your login View controller to SWRevealViewController, you should hide the navigation bar, which covers the other navigation bar inside SWRevealViewController.

    What I did is to hide the first navigation controller's navigation bar in prepareForSegue function of login page controller.