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

View Controller get initiated every time which causes it to loose state #54

Closed
goelv opened this issue Oct 29, 2013 · 2 comments
Closed

Comments

@goelv
Copy link

goelv commented Oct 29, 2013

Hi,

I have 3 view controllers - every time I switch between controllers using the residemenu the view controller gets initiated (viewdidload method gets called) and I loose any user state. Is there a way I can avoid this? Am I doing something wrong?

Thanks,
Varun

@romaonthego
Copy link
Owner

You can keep reference to your view controllers in the menu view controller and just switch content view controller of the RESideMenu. Something like that:

self.sideMenuViewController.contentViewController = self.myViewController;
[self.sideMenuViewController hideMenuViewController];

Make sure that you're running the latest version.

@goelv
Copy link
Author

goelv commented Oct 29, 2013

Hi Roman,

I kept a reference of the view controllers in my menu controller and it worked. Since I was using navigation controllers, I had to this:

navigationController.viewControllers = @[self.myViewController];
[self.sideMenuViewController hideMenuViewController];

Thanks!
Varun

@goelv goelv closed this as completed Oct 29, 2013
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