-1

I have been trying to implement a slide menu from left using SWRevealViewController. I have been following an article here which says that the Reveal view controller should be root/initial view controller. However in my case I want a slide out menu on "Home" which is the 3rd screen in my storyboard.

I have segues defined from 1st scene to Home and 2nd scene to home depending on the conditions.

Questions:

  1. Where can I fit in the Reveal view controller?
  2. What to do with the "segues" to "Home"?
StackCoder
  • 81
  • 8
  • I assume those 1st and 2nd scene should be like LOGIN and Registration are they ? then in that case. Set your root-view-controller as Reveal view controller. and for 1st and 2nd scene, you can present those controller and if you don't want to do that that you can change the root-view-controller programmatically. – Wolverine Dec 15 '15 at 11:29

1 Answers1

0

The Root View Controller is The first screen that launches after the app delegate.

the Reveal view controller should be root/initial view controller.

The statement basically means- Segue to the Reveal View Controller instead of "Home" for displaying the home page with side menu.The "Home" screen is a subview of the Reveal View Controller.

Just segue from the 2nd screen to the Reveal View controller.

It appears That the Following configuration works.

  1. In storyboard set SWRevealViewController as Initial View Controller.
  2. In appDelegate -

    self.window.rootViewController = [self.window.rootViewController.storyboard instantiateViewControllerWithIdentifier:@"1stScreen"];

  3. Instead of segues to Home do- [self.window.rootViewController.storyboard instantiateViewControllerWithIdentifier:@"SWRevealViewController"];

make sure to set the storyboard id of SWRevealViewController to "SWRevealViewController".