I am trying to implement side menu for my iOS app, using this library https://github.com/jonkykong/SideMenu By code implementation, below the code written in view did load func:
let menuRightNavigationController = UISideMenuNavigationController(rootViewController: SideMenuViewController())
SideMenuManager.default.menuRightNavigationController = menuRightNavigationController
SideMenuManager.default.menuFadeStatusBar = false
SideMenuManager.default.menuAddPanGestureToPresent(toView: self.navigationController!.navigationBar)
SideMenuManager.default.menuAddScreenEdgePanGesturesToPresent(toView: self.navigationController!.view)
But the Application is crashing on last two lines of the above code, and the below code written in button action:
@objc func menuButtonAction(sender: UIButton!) {
present(SideMenuManager.default.menuRightNavigationController!, animated: true, completion: nil)
}
Guys please help to handle the crashing so I can present my side menu. Thanks!