I have a UIWebView
in a UIViewController
. I am trying to push this view controller to an existing UINavigationController
, that has another view controller which also has a UIWebView
in it. After pushing the first view controller I try to simulate a memory warning, and then I hit "back" to go to the previous view controller, but now this webview is empty/blank. Any idea on how to go around this?
This is only happening on the iPad 1, running iOS 5.
Under a low memory condition under iOS 5.x or earlier, a view controller's view may be unloaded. Then when it needs to be loaded again, the view controller's
viewDidLoad
will be called after the view is put back in place. Make sure you are doing the right things inviewDidLoad
andviewDidUnload
to handle this case.