I am working on a bug in my program, but I cannot find a solution.
When the user opens the camera, UIImagePickerController is displayed and works fine. Although, when he presses the home button on the iPhone, I want to remove the object from NSMutableArray.
For example: The user opens the camera. The object is added to NSMutableArray in another class. The user presses the home button. The object must be deleted.
I cannot call the remove method when the application moves to the background, because I need another object so that it stays in the array for location services.
Is there a way to catch an event when either you press the home button or when the UIImagePicker is closed by the event itself on the home button?
source
share