Preserve old center view controller
I have my left drawer set up in such a way that tapping a menu item replaces what is being shown in the center.
If item 1 is originally loaded, then I tap item 3, and then go back to item 1, it looks like the content for item 1 has to be recreated from scratch. In my case this means that the same web service needs to be called again.
Is there a way to somehow preserve the center view controller before it gets swapped out?
I'm looking at airbnb and YouTube and once you've loaded a menu item in the center once, it's available again instantly.
Thanks!
Kevin
I do pretty much exactly what you want in my app as well. You just need to introduce some logic in your application that keeps a reference to the controller you want to keep around.
So before you set the centerviewcontroller, just simply make a strong reference to the current controller (or else where in your code)
Ya I would say setup logic in your left drawer to lazy load your center controllers, and keep references to them to restore.