I found that UIImagePickerController
can unload your parent view, especially if you bring up the camera, resulting in viewDidLoad being called again. I understand that this happens due to low memory. But I was storing the UIImage*
from imagePickerController:didFinishPickingMediaWithInfo
in the view controller. This data is lost after a reload. (The self
pointer for the view controller has changed, and the UIImage*
is null.) So is it a bad idea to store such variables in the view controller? Where should they be stored - in a global (singleton) object?
Thanks