I use the usual UIImagePickerController to capture photos using the device’s camera. Below is the code I use to create the UIImagePickerController,
self.imagePickerController = [[UIImagePickerController alloc] init]; self.imagePickerController.modalPresentationStyle = UIModalPresentationCurrentContext; self.imagePickerController.allowsEditing = NO; self.imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera; self.imagePickerController.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto; self.imagePickerController.cameraDevice = UIImagePickerControllerCameraDeviceRear; self.imagePickerController.delegate = self;
and the following code that I use to display the UIImagePickerController
[self presentViewController:self.imagePickerController animated:YES completion:nil];
Now that the UIImagePickerController is presented, if I zoom in on the capture and return to my view controller, the application will crash with BAD_ACCESS. After editing the circuit and some debugging, I see the following error:
- [PLImagePickerCameraView didHideZoomSlider:]: message sent to the freed instance 0x140109400
It seems that the scale slider delegate is being called on an unallocated instance. Has anyone else observed this behavior? I use work on iOS 8.1 and test it on iPhone 5S. Searching for PLImagePickerCameraView doesn't give much. Any information would be really helpful before I decided to go with a custom Picker.
source share