I am having problems with revealViewControllerin Xcode 7.2 and iOS 9.2.
My application starts with a controller built into the navigation controller to enter the system. After logging in or having a login token, I go to another view controller built into the navigation controller with the following code:
let homePage = self.storyboard?.instantiateViewControllerWithIdentifier("HomeViewController") as! HomeViewController
let homePageNav = UINavigationController(rootViewController: homePage)
let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
appDelegate.window?.rootViewController = homePageNav
In this home view controller, I would like to have a left navigation menu with SWRealViewController.
I had a view SWRealViewControllerrelated to sw_frontmy home navigation controller and the following code:
if (self.revealViewController() != nil) {
self.menuButton.target = self.revealViewController()
self.menuButton.action = "revealToggle:"
self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
But it self.revealViewController()always returns nil, so it does not work.
, - revealViewController (, ), , .