0

I want to dismiss the side menu view, which I implemented with the SWRevealViewController. How can I do this?

dimiss

Reinier Melian
  • 20,519
  • 3
  • 38
  • 55
minimomo
  • 581
  • 1
  • 6
  • 16

2 Answers2

0

I am also using swrevealviewcontroller for side menu. if u want side menu on any page simply paste following code in viewdidload, or if dont want side menu on some page simply delete the code.

if u want any help..comment below

if revealViewController() != nil {
    revealViewController().rightViewRevealWidth = screenBounds * 0.6875
    toggleButton.addTarget(self.revealViewController(), action: #selector(SWRevealViewController.rightRevealToggle(_:)), forControlEvents: UIControlEvents.TouchUpInside)
    view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
}
Rahul singh
  • 251
  • 3
  • 20
  • i wanted to dismiss the side menu, because is blocking my sign in view, which i using push segue to show the sign in view, but the side menu wont dismiss – minimomo Jul 19 '16 at 09:29
0

To do this you only have to call the properly method

self.revealViewController().revealToggleAnimated(true) //for left menu
self.revealViewController().rightRevealToggleAnimated(true) //for right menu I think this is what you want

I hope this helps

Reinier Melian
  • 20,519
  • 3
  • 38
  • 55