tags:

views:

18

answers:

1

I have a tabBar in my application. In one of the section i have two views which i toggle between using segment buttons.

In one of the view i have MapView which i use to display list of users using their pic as annotation. On the other view i have tableView which shows the same users in table format.

Now everything is working fine, i am getting all the users and it displays fine on the map. It works perfectly most of the time on all device and all iOS but sometimes when i bring the mapView to front or toggle or try to zoom in. Both the views (tableView and mapView) just gets removed somehow and i see black screen (which is btw my superview so thats not a problem).

Does anyone know why this happens. It happens frequently on iPhone 3G the older iPhone.

Thanx for any help.

A: 

I've had the same problem. I think it's due to low memory to which your app responds by deallocating the tableView and mapView. My solution was to have both views allocated in viewDidLoad. I'm not 100% sure about this, but you could give it a try.

Rits
Oh yes you are right. I am receiving memory warning and i completely forgot that i am removing both the views in -(void)didReceiveMemoryWarning. Thanx for pointing that out.
Tarang
But do you any idea how can i resolve this memory problem?? I have only like 4-5 users in database and still its out of memory.
Tarang