Using SWReveal in multiple views

335 Views Asked by At

I am using SWReveal in my main view, it works perfectly, but when I try to connect SWReveal to another view controller it won't work.

I mean I want to show SWReveal menu in any view contoller that I want, what is the solution?

1

There are 1 best solutions below

0
On BEST ANSWER

You need to change front view of swreveal by pushing

self.revealViewController().pushFrontViewController(newFrontViewController, animated: true)

After that add target to menu button

button.addTarget( self.revealViewController(), action:"revealToggle:" , forControlEvents: UIControlEvents.TouchUpInside)