views:

239

answers:

3

My iPhone application uses the camera to take pictures, which I suspect is somewhat memory-intensive. The app uses a custom background image for the view of its UINavigationController, and after taking a few pictures, the background goes all white. Any ideas on what I can do to stop this?

+2  A: 

Check to see if -didReceiveMemoryWarning is being called in any of your viewControllers. If it's a low memory problem, that's probably the culprit.

Ben Gottlieb
+1  A: 

Expanding on Ben Gottlieb's post, is it really necessary for you to have the custom background image? That by itself is a big memory waste; I shutter (eh, camera pun) to think of combining the two without releasing the picture before redisplaying the tableView.

Garrett H
I understand what you mean. But it's not my choice: the client really wants it.
Jonathan Sterling
A: 

Unfortunately, the project was very specific about having a background image, so I had to retain it despite the memory waste.

My work-around was to unload the background once you've entered the photos-view, and then reload it before you leave. Not the most beautiful solution, but it works really well.

Jonathan Sterling