Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to do push navigation on MainViewController from MenuViewController ? #27

Closed
tariq235 opened this issue Apr 10, 2017 · 1 comment
Closed

Comments

@tariq235
Copy link

In MainViewController for any push action I can easily call
self.navigationController?.pushViewController(UIViewController(), animated: true)

For changing mainViewController from menu then I can easily call
revealViewController().pushMainViewController(UIViewController(), animated:true)

But for some cases, I would like MainViewController to perform pushViewController from Left menu screen. Is it really possible with this library ? Or I should check other library ? This is currently main requirement for my project design :(

@iDevelopper
Copy link
Owner

You can easily do that like this, from the left view controller:

            let controller = storyboard?.instantiateViewController(withIdentifier: "YourViewController")
            let navigationController = self.revealViewController().mainViewController as! UINavigationController
            navigationController.pushViewController(controller!, animated: true)
            self.revealViewController().hideLeftView(animated: true)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants