I'm seeing some unexpected behavior when I trigger a simulated memory warning and I'm hoping someone can explain.
My application contains a UITabBarController and a UINavigationController. All my UI is created programmatically, nothing is loaded from a NIB. In my delegate function applicationDidFinishLaunching I create the tab controller, nav controller, and five view controllers. When I trigger the memory warning the main view turns completely white, leaving the nav at the top and tab at the bottom. When I change tabs the new tab reloads it's data correctly as loadView is correctly called, however the nav controller disappears.
This confuses me for two reasons. 1) Why is the main view being unloaded? I did not think viewDidUnload would be called on active view controllers. 2) Why does my nav controller disappear, but only after changing tabs. That is a real mystery.
Thanks.