views:

494

answers:

3

I have an application that makes use of drill-down views, tabbars, etc. I'm also making use of the UIImagePicker, as well as Route-Me for mapping support. Normally, the application performs fine. However, I find that if I perform a lot of activities and then switch between views, I end up with a blank screen and my view is not drawn. My hunch is this is memory related, but how can I be sure? Has anyone encountered a similar situation? How did you go about correcting it? What can I look for? Thanks for any help you can give!

Steve

A: 

You're view is probably being unloaded in the background. If you have access to forums, here is a good thread: https://devforums.apple.com/message/56191

Basically, you need to expect that while in another part of the application, iphone may unload a view which isn't active (see viewDidUnload method). When you switch to that view, it will then call viewDidLoad again.

nessence
A: 

If that is the case, what can be done about it? How would I handle such a situation? I would assume since it is calling viewDidLoad that I would see the view recreated. However, I'm left with just a blank screen. Thoughts?

A: 

I had this exact problem... In the method that handles my UIView switching, I checked for ([newViewController.view superview] == nil) which it was during a blank-out! So I went and re-initted it using [[NewViewController alloc] initWithNibName:@"NewView" bundle:nil]

Hope this helps!

taber