I have very unique problem. My app has UINavigationCnotroller with a set of UIViewController’s. Most of the time everything goes fine but at some point, when I press Back button, the UIViewController to which I return suddenly reloads. i.e. the loadView called second time and the interface becomes squashed.. Prior to this I had UITabbarController in which I saw the same issue (when switching between tabs). It looks like UINavigationController/UITabBarController just reset some of UIViewController at some point. Also, this issue is visible only on device. Any ideas??
Many thanks in advance!!!
The reason
-loadViewis getting called again is that the view, while offscreen, got unloaded: your application got a memory warning and the view-controller system tried to release whatever views weren’t currently visible. Your interface becoming “squashed” suggests that you’re not unloading it properly; make sure that your-loadViewmethod can create the entire UI from scratch, and that your-didReceiveMemoryWarning—whose default implementation releases the view if it has no superview, which is what’s happening here—is letting go of any parts of the view you’re holding on to.