I am very new to Swift. I am working on SWRevealViewController in swift 3. My requirement in my project is I have a LoginView Controller. In that, if Login is success means I will get to HomeViewController. In HomeViewController I need SWRevealViewController.
I drag and drop one new Viewcontroller and I named it as SWREvealViewController. Again I drag and drop two View Controllers and One I named it as FrontView and the second one as Menu view. I gave the respective segues to the two view controllers. But for me, I am getting reveal view controller is nil. I tried a lot of scenarios which I found on google and some of the tutorials.
Here is my code which I am trying to navigate to the Next view controller.
if self.userNameArray.contains(usertextField.text!) && self.passwordArray.contains(passwprdTextField.text!)
{
print("you have pressed OK button");
let view: MenuViewController = self.storyboard?.instantiateViewController(withIdentifier: "MenuViewController") as! MenuViewController
let navigationController:UINavigationController = UINavigationController(rootViewController: view)
myActivityIndicator.stopAnimating()
self.revealViewController().setFront(navigationController, animated: true)
//self.navigationController?.pushViewController(view, animated: true)
}
else
{
self.registerAlert();
}