please help me with this obstacle. I have a MKMapView with about 200 annotations. When I tap one of them, a detail view is pushed into UINavigationController so the MKMapView gets hidden. During browsing the presented detail view, I get memory warning and the hidden view is unloaded. After I close the presented detail view, the view with MKMapView is loaded again, but no annotation is visible (except User Location blue bubble) and focus is reset to the default one. [mapView: viewForAnnotation:] doesn't get called.
Even if I remove all annotations in viewDidUnload and insert fresh ones in viewDidLoad, the MKMapView doesn't display them anyway, even though [mapView: viewForAnnotation:] gets called for every single one.
Any idea how to make it behave and keep the same visible map rectangle after unload & load? Thank you very much.
EDIT - RESOLVED! The problem was that in the initWithNibName, I was getting
map = (MKMapView*)[self.view viewWithTag:TAG_MAP];
and from that moment on, I worked just with the 'map' variable. But after the reload, the variable apparently pointed to an invalid object. So I moved the command above to the viewDidLoad and now it works a treat. Thanks Craig to pointing me to the good direction!