Navigation drawer menu with "SWRevealViewController" in iOS swift3

717 Views Asked by At

I implemented navigation drawer menu using SWRevealViewController. It was working fine as a menu drawer which is the navigation menu located as a rootviewcontroller, but in my app, only after the login page do I need to show the navigation menu in the home page.

In the home page, why is it not working?

1

There are 1 best solutions below

1
On

1) Please check below image. I think you want something like this.enter image description here

2)If yes, then set the identifier sw_front like: enter image description here

This will lead to home screen that comes after login.

3) then set the identifier sw_rear like: enter image description here

This will lead to side bar menu.

4)Also write the following method in Appdelegate's didFinishLaunchingWithOptions:

let storyboard = UIStoryboard(name: "Main", bundle: nil)

            let swRevealView: SWRevealViewController!
            swRevealView = storyboard.instantiateViewControllerWithIdentifier("swRevealView") as! SWRevealViewController
            self.window?.rootViewController = swRevealView