SWRevealViewController
SWRevealViewController copied to clipboard
Parent ViewController == nil
i have leftside menu in my project . i had given "sw-rear "to my leftmenuVC . After clicking my menubutton i am getting ParentVC as nil.
navigationItem.leftBarButtonItem = UIBarButtonItem(image: UIImage(named:"ic_menu"), style: UIBarButtonItemStyle.plain, target: self, action: #selector(menuButtonPressed))
@objc func menuButtonPressed()
{
if revealViewController() != nil{
self.navigationItem.leftBarButtonItem?.target = self.revealViewController()
self.navigationItem.leftBarButtonItem?.action = #selector(SWRevealViewController.revealToggle(_:))
self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
}
}
It is not sw-rear but sw_rear
by mistake i type here like that but in project i mentioned correct.

What is ParentVC?
the parent should Come as SWRevealViewController

I can't see a sw_front segue in your storyboard, how do you set the front view controller? SWRevealViewController should be the initial controller and ActivitiesVC the front view controller...