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?
views:
239answers:
3
+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
2010-01-14 02:07:24
+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
2010-01-14 03:02:03
I understand what you mean. But it's not my choice: the client really wants it.
Jonathan Sterling
2010-01-14 04:38:37
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
2010-01-29 23:48:31