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
*override func viewDidLoad() {
super.viewDidLoad()
.
.
.
menuButton.addTarget(revealViewController(), action: #selector(SWRevealViewController.rightRevealToggle(_:)), for: .touchUpInside)
if revealViewController() != nil {
revealViewController().rightViewRevealWidth = 200 //any number
view.addGestureRecognizer(self.revealViewController().panGestureRecognizer()
view.addGestureRecognizer(self.revealViewController().tapGestureRecognizer())
}
}
}
in the main story board add a segue of type "custom" from SWRevealViewController to ur sideMenuViewController
then select the segue and in the inspector set its identifier to sw_right
and class to SWRevealViewControllerSegueSetController
that's all.**