If I use storyboards everything works, if I instantiate it programmatically the controllers .revealViewController() is always nil and because of that it doesn't show the side controllers at all. Do I need to call something else after instantiation?
Repro:
1.
Modify the Swift3 Example, at the bottom of "AppDelegate.swift" add these lines just before "return true":
Go to the "Main.storyboard" file and change the main navigation controller identifier to "MainNC1".
Edit: The rest works correctly, if I save and instance of PBRevealViewController I can show and hide the side controllers, it's just the .revealViewController() that doesn't work.
If I use storyboards everything works, if I instantiate it programmatically the controllers .revealViewController() is always nil and because of that it doesn't show the side controllers at all. Do I need to call something else after instantiation?
Repro:
1.
Modify the Swift3 Example, at the bottom of "AppDelegate.swift" add these lines just before "return true":
let vc = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "MainNC1") guard let finalVcLoggedIn = PBRevealViewController(leftViewController: UIViewController(), mainViewController: vc, rightViewController: UIViewController()) else { fatalError() } self.window?.rootViewController = finalVcLoggedIn self.window?.makeKeyAndVisible()
2.
Go to the "Main.storyboard" file and change the main navigation controller identifier to "MainNC1".
Edit: The rest works correctly, if I save and instance of PBRevealViewController I can show and hide the side controllers, it's just the .revealViewController() that doesn't work.