For all intents and purposes, MMDrawerController basically acts like a UINavigationController, where it holds a ViewController as the root VC.
Is it ok practice to hold the MMDrawerController in a variable in the root VC or should I store a reference to the MMDrawerController in the AppDelegate?
I don't want to run into any memory issues and the reason I ask is because at some point in a Registrations Controller I have to presentViewController(rootVC)
. This would be a different instance of the root VC and I would either have to store the reference to the MMDrawerController in the Registrations Controller OR maybe call upon the AppDelegate and change the MMDrawerController stored there to the new one for the new Root VC?
I suppose that second option would work fine, but still curious overall about my question in the title.
Also, one last thing: Is there any way when one calls presentViewController(...)
to make the new ViewController the new initial controller? As it stands, in the new presented controller I would still be able to dismissViewControllerAnimated(...)
which means that the underlying stack of View Controllers are still in memory. I'd like them dumped from memory. Should I even be concerned about that?