I am using SWRevealViewController library to make a slide out menu in swift, but I am struggling to put this menu in the right side. I have seen on the library description this
I followed this solution, in the controller of the front siding view use this:
override func viewDidLoad() {
super.viewDidLoad()
if self.revealViewController() != nil {
favoritesButton.target = self.revealViewController()
favoritesButton.action = "rightRevealToggle:"
self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
}
}
Don't forget to create the Outlet to the item bar button first. In the storyboard, set the segue value to sw_right
And first that didn't work for me, but a clean helped.