Ted
Ted

Reputation: 3875

didReceiveMemoryWarning using a Tab Bar

I have a UITabBar holding 3 UIViewControllers. One being a map, the other - a table, and the third - my own custom controller. I noticed lately that my app has some issues when it comes to operating on low memory, and it's due to me not being clear about what to do when didReceiveMemoryWarning occurs.

Usually, and when with sufficient memory, all functions great. I would alloc all my controllers on the applicationDidFinishLaunchingWithOptions and all controllers work great.

But what happens when the memory is a bit low is that (for some reason) only my table is misbehaving. First, I can see that the app received a memory warning. and then only my table gets a viewDidUnload. At first I wasn't sure why my table became *completely empty*, but then I realized that my delegation methods stopped working rendering my reloadData essentially pointless.

So, I can see now that the didReceiveMemoryWarning is cascading through all my viewControllers. But viewDidUnload is called only on my table.

I want to know what is going on?

What should I be doing in this case?

Upvotes: 0

Views: 256

Answers (0)

Related Questions