Menu in Slide Menu using SWRevealViewController not working

790 Views Asked by At

Please find the Image which shows my project storyboard.

  • iOS version - 6.0 and above
  • Xcode version - 6.2
  • Problem -> After Login, I open slide menu and click Rewards and i navigate to "View Controller 2". Then, from "View Controller 2" i click "Menu" option but i do not navigate to "View Controller 1" instead i get an empty page which does not show anything. My "Push Controller Segue 1" is not working but "Push Controller Segue 2" is working. When click the button in Login Form i navigate to "View Controller 1" (i have written this programmatically).
  • Solution Required - How to navigate to "View Controller 1" when i click "Menu" in Table View Controller (sw_rear).

Any sort of information required from me please let me know.

1

There are 1 best solutions below

0
On BEST ANSWER

So, as discussed, the problem is the Segue from the login view controller to the menu view controller, the only issue is that the type of the segue used to do this was a show detail segue, which needs to be a show segue instead, which embeds the destination view controller in a UINavigationController.

Your main menu class (using SWRevealViewController) is expecting a UINavigationViewController to perform it's segues, which it is not able to find since the destination class is not embedded in a Navigation View controller. Either change the segue to show or you can choose to embed your destination view controller in a UINavigationViewController, but I would recommend to do the former.

Just for your reference, here is an interesting read on the difference between the show and the show detail segues:

What are the differences between segues: "show", "show detail", "present modally", "present as popover"?

Hope this answers your question.